Beware of letting Satan take up residence in the house of your thoughts and intentions. Once he enters, he corrupts them with a ruin that is hard to repair, casts into you every sort of destructive whisper and harmful notion, and blocks you from reflecting on what would truly benefit you. You are the one who has aided him against yourself by granting him access to your heart and passing thoughts until he came to rule over them.
Your case with him is like that of a man who owns a mill in which he grinds choice grain. Someone arrives carrying a load of earth, droppings, charcoal, and refuse, wanting to grind it in the mill. If the owner drives him away and prevents him from dumping his load into the millstones, he can go on grinding what profits him. But if he permits him to empty that load into the mill, it spoils all the grain inside and every bit of flour comes out tainted.
What Satan throws into a person’s soul is confined to a few categories: brooding over what has already taken place, picturing how it would have been had it turned out otherwise; occupying oneself with what has not happened, imagining how it might be were it to occur; pondering matters in which the mind has no lawful share, such as forms of immorality and the forbidden; or indulging in fanciful illusions with no reality—either outright falsehood, or subjects whose knowledge has been sealed off from us. He plunges the mind into these restless notions that reach no goal and arrive at no conclusion, turning them into the arena of one’s thought and the pasture of one’s imagination.
The all-embracing remedy is this: In the realm of knowledge and mental conception, busy your mind with what you must know about tawhid (the oneness of Allah) and its due rights; with death and what follows it until entry into Paradise or Hell; and with the defects that beset deeds and the ways to guard against them. In the realm of will and resolve, occupy your soul with desiring whatever benefits you to desire, and abandon the desire for whatever would harm you if you desired it.
Those endowed with true insight hold that merely longing to commit treachery and preoccupying the mind and heart with it harms the heart more than the treachery itself—especially once the heart is otherwise free of it after the deed has been done—for the very act of longing keeps the heart busy with it, fills it, and makes that betrayal its chief concern and aim.