Ibn Al-Qayyim has a profoundly powerful statement in his book Al-Fawaa’id, referring to negative and sinful thoughts. He said:
“You should repulse a thought.
If you do not do so, it will develop into a desire. You should therefore wage war against it.
If you do not do so, it will become a resolution and firm intention. If you do not repulse this, it will develop into a deed.
If you do not make up for it by doing the opposite thereof [the opposite of that evil deed], it will become a habit. It will then be very difficult for you to give it up.”
May Allah help us, Ameen!