I hope that you can tell me the right way to deal with this, and pray for me. May Allaah reward you with good.
Compulsive waswaas (al-waswaas al-qahri) is a kind of sickness, and the one who is affected by it should treat himself in a number of ways:
1 – Turning to Allaah and beseeching Him, for He answers the one who is in distress if he calls upon Him, and grants him relief. So let him say what Ayyoob (peace be upon him) said:
“And (remember) Ayyoob (Job), when he cried to his Lord: Verily, distress has seized me, and You are the Most Merciful of all those who show mercy”
And the Prophet (peace and blessings of Allaah be upon him) said: “Allaah has not sent down any disease but He has also sent down its cure. Those who know it, know it, and those who do not know it, do not know it.” Narrated by Ahmad, classed as hasan (sound) by al-Albaani in Ghaayat al-Maraam, So the cure comes from Him, and healing is in His Hand so beseech Allaah and make the most of the time before dawn, for Allaah descends every night to the lowest heaven when the last third of the night is left, and He says: “Who will call upon Me, that I may answer him? Who will ask of Me, that I may give to him? Who will seek My forgiveness, that I may forgive him?” Narrated al-Bukhaari, and Muslim,.
2 – Turning away from waswaas and what it calls you to, and distracting yourself from it by keeping busy with worship and acts of obedience as much as possible. Hence the Prophet (peace and blessings of Allaah be upon him) told the one who was affected by waswaas: “Let him seek refuge with Allaah and stop (such thoughts).” Narrated by al-Bukhaari, and Muslim,.
If the urge to swear and curse comes, then seek refuge with Allaah from the accursed Shaytaan, and keep yourself busy with remembrance of Allaah (dhikr) and glorifying Him (tabseeh), or raise your voice reciting Qur’aan, or speak to your friend, and so on.
3 – Remember Allaah a great deal (dhikr), especially by praying for forgiveness, for waswaas comes from the Shaytaan or he has some involvement in it, but when Allaah is mentioned he slinks away or flees. Allaah says (interpretation of the meaning):
“And if an evil whisper from Shaytaan (Satan) tries to turn you away (O Muhammad) (from doing good), then seek refuge in Allaah. Verily, He is the All‑Hearer, the All‑Knower”
Ibn Katheer (may Allaah have mercy on him) said in his Tafseer (exegesis):
With regard to the devils among the jinn, there is no way to ward it off if he whispers except to seek refuge with his Creator Who has allowed him to gain power over you. If you seek refuge with Allaah and turn to Him, He will restrain him and foil his plot. When the Messenger of Allaah (peace and blessings of Allaah be upon him) stood up to pray he would say: “I seek refuge with Allaah, the All-Hearing, All-Knowing, from the accursed Shaytaan, from his whisper, his arrogance and his poetry.” End quote.
Muslim narrated that ‘Uthmaan ibn Abi’l-‘Aas came to the Prophet (peace and blessings of Allaah be upon him) and said: “O Messenger of Allaah, the Shaytaan has interfered with my prayer and made my recitation confused.” The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “That is a devil called Khanzab. If you experience that, then seek refuge with Allaah from him, and spit drily to your left three times.” He said: I did that, and Allaah took it away from me.
And the advice that Yahya (peace be upon him) gave to his companions was: “I enjoin you to remember Allaah, for the likeness of that is of a man who was pursued by the enemy, until he came to a strong fortress where he found protection from them. Similarly, a person cannot protect himself from the Shaytaan except by remembering Allaah (dhikr).” Narrated by al-Tirmidhi, classed as saheeh (authentic) by al-Albaani in Saheeh al-Tirmidhi.
4 – Going to a trustworthy Muslim doctor, for this waswaas is a kind of sickness, as stated above. The Prophet (peace and blessings of Allaah be upon him) said: “Seek medical treatment, for Allaah has not created any disease but He has also created a cure for it, except for one disease: old age.” Narrated by Ahmad, Abu Dawood, al-Tirmidhi, 2038; Ibn Maajah, . classed as saheeh by al-Albaani in Saheeh Abi Dawood.
5 – You should note that whoever is afflicted with this sickness is excused for what he says, because he does not say it willingly and he does not like it. Rather he will be rewarded, in sha Allaah, if he bears it with patience and seeks reward. He will be rewarded for hating the waswaas and trying to escape it. Hence when some of the companions of the Prophet (peace and blessings of Allaah be upon him) came and asked him: “We find in ourselves something that is too awful for any of us to speak of it,” he said: “Do you really find that?” They said: Yes. He said: “That is clear faith.” Narrated by Muslim, from the hadeeth of Abu Hurayrah (may Allaah be pleased with him).
Al-Nawawi said in Sharh Muslim:
What this means is that the fact that you find it too awful to speak of is a sign of clear faith, because finding it too awful to speak of and being afraid of it and of uttering it, let alone believing it, is the sign of one who has achieved true and perfect faith, and who has shed all doubts. End quote.
We ask Allaah to heal you and make you well.
And Allaah knows best.