Answered by Shaykh Faraz Rabbani
Question: Of late I have been suffering from one strange problem. Its like for a flash of a second something very unimaginable about Allah (SWT) or his prophet comes in my mind and goes away
Answer: In the Name of Allah, Most Merciful and Compassionate. May His blessings and peace be on His Beloved Prophet, the best of creation, and his family, companions, and followers
Walaikum assalam wa rahmatullah,
Your warding off such thoughts is a sign of sure faith, as the Prophet (Allah bless him and give him peace) termed it in an authentic (sahih) hadith.
The way to block such thoughts is to become realized in your love and slavehood to Allah, which is through fulfilling your obligations and leaving all sin with sincerity and devotion in matters of worship, personal practice, and worldly dealings.
With this, one should seek to illuminate one’s life with the light of the guidance of the Beloved Messenger of Allah (Allah bless him and give him peace) in a meaningful and systematic yet gradual way. The keys to this are seeking beneficial knowledge from living righteous scholars, keeping the company of the righteous, and being frequent in repentance and remembrance of Allah.
And Allah alone gives success.