Assalamualaykum wa Rahmatullah
If you wanted to do major shirk or kufr but you didn’t do it, does it put you out of the fold of Islam and your good deeds are erased? Even though you didn’t physically do shirk/kufr. For example your a muslim and you took necessary steps to go to a temple to worship idols but you didn’t do it. Has it put you out of the Islam and your good deeds are destroyed?
A person is not accountable for thoughts that pass their mind. Contemplating an act of disbelief will not lead one out of the fold of Islam. You should engage yourself in the remembrance of Allah the Almighty by reciting Qur’an, sending salutations upon the Prophet (may Allah bless him and give him peace) and other forms of remembrance such as the declaration of faith (kalimah) to help you remove these types of thoughts from your mind.
One du’a you could read is:
Rabbi ‘a’audhu bika min hamazaatish shayatin wa ‘a’audhu bika rabbi an yahdurun
My Lord, I seek your protection from the prompting of the Devils, and my Lord, I seek your protection from them approaching me.
Ifta Research Fellow
Checked & Approved by:
Mufti Abdul Rahman Mangera
Mufti Zubair Patel