I recently ran across this verse from the Quran:
"and worship thy Sustainer till death comes to thee" (15:99) [Asad translation]
Although the last word in the verse (Yaqin) literally means 'certainty', the most popular interpretations have it alluding to either death or the Day of Judgment.
This got me thinking how the meaning of this verse would considerably change if it were taken literally: "And worship your Lord until you attain certainty."
I read the verse as a command from our Creator, Who is most aware of our inner workings, to struggle through any existential doubts and reservations by continuing in our acts of obedience and worship.
When we feel down and out, beaten down by the trials and tribulations of life, having hit a spiritual road block, doubting the purpose of life, doubting our Creator, questioning His Love, questioning His Wisdom – we are to maintain our worship and He will make that commitment to worship a means of our attaining the much-needed comfort that is brought by certainty.
I don't see this doubt that occasionally creeps into faith as being such a bad thing. It’s a force that strengthens and fortifies one's convictions, sometimes through a process of needed adjustment and revision.
And it's in that light that I sometimes read the story of Prophet Ibrahim (saw) when he gazed upon the Sun, the Moon, and the Stars as possible objects of worship. The doubt projected by him did not posit him into the folds of the disbelievers, but it increased him in his belief of the One.
Doubt is the vaccination (in the form of a virus) injected into the body to strengthen the immune system of certainty. Doubt is the manure used as fertilizer to aid the growth of the beautiful flower of certainty. Doubt needn't be discouraged and rejected, but can actually be used as a tool to further one's faith.
And the proper way to deal with this doubt is not to abandon your Lord, but rather to uphold the relationship of servanthood and permit Him to return you to the blessed realm of Yaqin.