Question :
My problem is that I have evil thoughts that incite me to disavow Islam, but I always resist that by uttering the testimony of faith, remembering Allah and sending prayers on the Prophet (PBUH). Thanks to Allah, I`m a committed Muslim and I do my best to hold fast to my faith. However, does having such thoughts take me out of the fold of Islam or not?
The Answer :
All perfect praise be to Allah, The Lord of The Worlds, and may His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
Allah, The Almighty, is so Merciful to His slaves that He Doesn`t Hold them to account for their thoughts and desires unless they act upon them or talk about them. He has also placed no burden on them, so He neither burdens a soul beyond its scope nor asks of any soul except that which He has given it. Therefore, a Muslim is to be called to account only for that which is in his scope. Prophet Mohammad (PBUH) said: "Allah has forgiven my followers the evil thoughts that occur to their minds, as long as such thoughts are not put into action or uttered." {Agreed upon}.
Although evil thoughts is a serious affliction that could befall a Muslim, he/she should seek refuge in Allah, have faith in Him, be determined to repel them, and he/she will be rewarded for that. It is narrated on the authority of Abu Huraira that some people from amongst the Companions of the Apostle (PBUH) came to him and said: "Verily we perceive in our minds that which every one of us considers it too grave to express. He (the Holy Prophet) said: "Do you really perceive it? They said: Yes. Upon this he remarked: That is the faith manifest." {Muslim}.
We advise you (asker) to observe different acts of obedience, avoid what is forbidden, and make supplication as well as visit a specialized physician hoping that it helps you overcome this affliction. We pray that Allah favors you and us with forgiveness and good health. And Allah Knows Best.