The book of Job consists of much "back-and-forth" between Job, God, and the "miserable comforters" who tell Job that he deserves to suffer even more than he already is. Job questions, but it is never revealed to Job why this pain fell upon him. Some might take this to mean that we can't question God - because we know the end of the story - but I would say that the whole point is that we can question. Our questioning does not change the outcome, nor does it make God love us less, but we are free to wonder why there is so much pain in our world. We can have faith that God is for us and will never leave us nor forsake us, but should we doubt, God is right there waiting to pick us up. We don't have to start over from square one every time we mess up - we would never get anywhere.
I want to leave you with a verse from a song. I am not going to post an audio or video clip (you can look it up on YouTube if you want; the song is called "Oh Heart Bereaved and Lonely" by Leigh Nash), but one verse in particular has given me comfort through my doubting periods:
Oh cling to thy redeemer: thy savior, brother friendBelieve and trust his promise to keep you ‘til the endOh watch and wait with patience, and question all you willHis arms of love and mercy are ‘round about thee still