Here is a beneficial chapter from Imam Nawawi’s Al Adhkar for rectifying our negative inner thoughts that are especially predominant among women given our weak innate nature and easily manipulatable heart caused by the waswaas (whisperings) of the shaytan.
Know that having evil thoughts about someone is forbidden just as evil speech (is). So just as it is forbidden for you to speak to others about the faults of someone, it is also forbidden for you to speak to yourself about that and to hold negative thoughts of him. Allah says:
“O you who believe, avoid much (types) of suspicion. Verily some (forms) of suspicion is a sin.” [49:12]
And Abu Hurairah reported that Allah’s Messenger (saws) said: “Beware of suspicion, for indeed suspicion is the most untruthful form of speech.”
And the Ahadeeth with the meaning of what I have mentioned are many. And the meaning of this (the backbiting of the heart) is the heart concluding and judging someone with negative thoughts. But as for passing thoughts and one’s talking to himself, if these thoughts do not remain established and continuous, then he is excused, according to the consensus of the scholars, because he has no choice in this happening, and he has no means of disassociation from them. This is the understanding of what has been established in the authentic texts, as the Prophet (saws) said, “Indeed, Allah has permitted for my Ummah that which their souls whisper to them, so long as they do not speak it out (audibly) or act upon it.”
The scholars said, “This refers to the thoughts that do not establish themselves.” And they said, “This is regardless of whether this thought consists of backbiting or kufr or otherwise. So if kufr crosses someone’s mind, but it is only a thought, without the intent of acting upon it, and he then dismisses this thought immediately, he is not a kaafir, and there is no sin on him.”
We have stated in the chapter on Waswasa the authentic Hadeeth in which the Companions said: “‘O Messenger of Allah! Some of us find things in our thoughts that are too tremendous to speak of .’ So he said, ‘That is the confirmation of Faith.’”, and others besides that we mentioned there that have the same meaning.
And the reason what we previously mentioned is excused is the impossibility of averting (these kinds of thoughts). Rather, it is possible to avoid having these thoughts continuously, and this is why the heart’s persistence and fastening itself to these thoughts is forbidden (and not the thoughts themselves).
And whenever these thoughts of backbiting or other sins present themselves to you, it is obligatory on you to repel them by turning away from them and mentioning explanations that will distract from what seems apparent.
Abu Hamid al-Ghazali said in al-Ihyaa’, “Should evil thoughts affect your heart, then these are from the whisperings of Shaytaan, which he casts within you. So you must disavow them because Shaytaan is indeed the most evil of evildoers. And Allah has stated:
‘If a wicked person (i.e. faasiq) comes to you with news, then verify it, lest you harm people without realizing it (i.e. out of ignorance) and afterwards you become regretful for what you’ve done .’ [49:6]
Thus, it is not permissible for you to believe Iblees. And if there were an presumption that points to evil, and the opposite is possible, then holding negative thoughts is not permissible.
And among the signs of evil thoughts about someone is that your heart changes towards him from the way it used to be, and that you flee from him and find him burdensome. And that you slacken in your consideration towards him, in your hospitality to him, and in your worry when he commits bad deeds. And indeed Shaytaan comes close the heart with the smallest trace of the faults of the people, and he makes you think that (these thoughts) occur due to your sharpness, intelligence and quick alertness, and that the believer sees with the light of Allah (i.e. Allah has led him to this and not Iblees). But this person is, in actuality, speaking with the deceptions of Shaytaan and his injustice.
And if a just person informs you of (negative things about another Muslim), then neither believe him nor disclaim him, in order that you will not have negative thoughts about either of them.
Whenever some evil thoughts about another Muslim cross your mind, then increase in your consideration towards him and kindness to him, as this will enrage Shatytaan and repel him from you so that he will not cast within you such thoughts out of his fear that you will instead preoccupy yourself with supplication for that person.
And whenever you come to know of a fault in a Muslim based on undoubtable proof, then advise him in secret and do not let Shaytaan deceive you and invite you to backbite about him. And if you admonish him, then do not admonish him while you are happy with your knowledge of his deficiency, so he looks at you with the eyes of esteem and you look at him with belittlement. Rather, intend to free him from sin while you are saddened, just as you are saddened over yourself if a deficiency enters into you. And it is necessary that his abandonment of that deficiency without your admonishment be more beloved to you than his abandoning it after your admonishment.”