The end of perceiving darkness is the beginning of an enlightened faith.
I think faith has many stages, we start with blind, and then we get to see things that lead to it, live it, experience it, choose to hang on it, increase it, decrease it, and so on.
I might not entirely get what you're really trying to ask, but instances where we see pitch darkness all around us may mean two things.
1. If we have sincerely prayed and have sought guidance from Allah swt with the thought in our hearts that He is the only One who guides and He will not let us go astray, then even if the darkness prevails, we have to accept it as the decree of Allah swt which, also is a huge step of faith, i.e to accept takdeer (fate, as is decided by ALlah swt). We may be sorrowful for it, but we will know in our hearts that this was the will of Allah and the best thing that could happen at that time.
2. When we haven't prayed much and are not guided/do not want to be guided to the right path, or haven't taken practical steps to emerge from the darkness; the darkness can act as a catalyst which leads us to the light. If you start believing in faith, or wanting to shed the darkness all around, the darkness will seem to fade, but if your heart still desires the temptation of the darkness, it will seem to prevail.
Just like the other day, my small kitty fell from the roof to the ground, she misplaced her neck, twisted her shoulder/front limbs, and was unable to move herself all back together, stuck in a miserable position

I was so dismayed, first her mother abandonned her, now this! she was in so much pain, and I got so panicked that instead of trying to help her, (darn to my medicine degree :/) I started crying

: She almost breathed her last, heaving and moaning lightly lying still, I prayed to Allah to only ease her pain...I wanted to do something, but I let passive thoughts take over, like what if she doesn't survive, what if I cause her more pain or kill her if i try to re locate her joints? what if she's meant to die?
Then My brother came, picked her up, placed her on a flat firm surface, tried to pull her joints back to place, I only told him to place it on her left lateral side and put her neck straight a bit stretched ( I don't know why i said that


she was still, completely, not a single movement, it seemed oxygen stopped to her brain and her brain stem stopped working. Then we prayed her fatiha. Went inside to prepare for her burial and a bath. came out after 10 minutes to see her standing up!
SubhanAllah, she was almost dead! And by the grace of Allah swt she resumed her breathing and got up, it was such an unbelievable moment. But had she gone away, I would have to accept it as the decree of Allah....