Intrusive thoughts come to him and he is afraid that the Shaytaan will take away his faith
Question

Please pray for me to be made steadfast in adhering to the true religion, because I am suffering from troubles caused by the Shaytaan, who is trying his utmost to change my religion, then my trust in my Lord, then my self-confidence. I swear by Allah the Almighty that I am suffering in a way that no one knows except my Lord, may He be glorified and exalted. The Shaytaan is trying to take faith away from my heart and is trying to make me disbelieve and go astray – Allah forbid. He has even started to take the form of my character. Sometimes he utters the shaahadah, meaning that he says it in full with me, and he makes me doubt my intention in worship, such as joining me in the prayer and making me confused about my prayer, by means of compulsive intrusive thoughts, and he completes with me the recitation of Soorat al-Faatihah, the tashahhud and the tasleem. I am in an extremely serious situation regarding my faith, and I am afraid that he will achieve his goal by making me disbelieve or associate something with Allah, may He be glorified and exalted. I am afraid that he will cause trouble to other Muslims as well, by leading them astray or making them disbelieve. Please help me to rid myself of this trouble.
Praise be to Allah.Take it easy, for the matter is much easier than you think.
What you are suffering is like a shadow that grows bigger until it covers the entire wall, because the source of light has been placed in the wrong position. If the source of light is moved to the right position, the shadow will be reduced to the right size.
In either case, there is nothing harmful, great or small, in the shadow.
Your situation is no more than a shadow, so take it easy.
The Shaytaan cannot take away your faith, because the one who gives faith and takes it away is Allah. If Allah protects you, you will be safe from all harm.
If you want to be relieved of all these troubles that the Shaytaan is causing you, then you must strengthen your resolve and do the following:
1.. Seek refuge with Allah every time one of these thoughts crosses your mind, and do not falter, for the Shaytaan will inevitably be defeated and flee. This is a true promise from Allah (interpretation of the meaning): “And if there comes to you from Satan an evil suggestion, then seek refuge in Allah. Indeed, He is the Hearing, the Knowing” [Fussilat 41:36].
2.. Ignore these intrusive thoughts and do not think about them at all; do not dwell on them or try to answer any question posed by these intrusive thoughts.
Do not yield to any threat from the Shaytaan or let him scare you with disbelief, misguidance or hellfire.
Do you know why? Because these threats have no effect on the level of your faith and none of that will happen to you.
It is like scary scenes on a TV screen that do not harm the viewer, and when you turn the TV off everything disappears.
3.. Fill your time, your thoughts and your heart with that which is beneficial and useful, and mix with good people, for perhaps you are suffering because of having too much free time or being lonely. The Shaytaan does not come near a vessel that is full.
4.. Offer supplication (du‘aa’) night and day, for when the healing of Allah comes, it does not leave behind any sickness or trouble but it resolves it.
5.. Fortify yourself with the remembrance of Allah throughout the night and at the ends of the day, at every moment, for there is nothing better with which to protect oneself from the schemes of one’s enemy than the remembrance of Allah, may He be exalted, and being steadfast in that. So keep your tongue moist with the remembrance of Allah.
6.. In addition to these spiritual remedies, you must consult a competent specialist doctor, for in the case of compulsive intrusive thoughts, there are medicines which may be beneficial by Allah’s leave, and if you combine the two remedies – spiritual and medical, that will be more beneficial for you, and more likely to lead to healing, by Allah’s leave.
If you follow this advice and persist in striving to control your nafs, then glad tidings of recovery will soon come, by Allah’s leave, and will increase hour after hour, until you are completely healed within a few days, by the help of Allah.
See also the answers to questions no. 102851 and 25778 .
May Allah make you steadfast in faith and bestow upon you well-being and forgiveness.
And Allah knows best.