What should you do when unwanted thoughts invade your mind—not during prayer, but during ordinary life?
The Tanya's twenty-seventh chapter offers counterintuitive advice: be happy about it.
Rabbi Schneur Zalman addresses the person who is going about daily business when lustful or impure thoughts suddenly appear. The natural reaction is shame and distress. But the Tanya says: if you turn your mind away from these thoughts, you are fulfilling the commandment in (Numbers 15:39): "You shall not follow after your heart and after your eyes by which you go astray." This verse does not speak to the tzaddik (a righteous person), who does not have such thoughts. It speaks to the benoni—the ordinary person whose mind is a contested battleground.
Every time you refuse to follow a lustful thought, the Talmud teaches in Tractate Kiddushin, you receive reward as if you had performed a positive commandment. The refusal itself is the mitzvah. So instead of being sad about the intrusion, be glad about the refusal.
The Tanya then diagnoses the real source of the sadness: conceit. The person is upset because he expected to be above such thoughts. He imagined himself a tzaddik—someone whose mind is a sanctuary of pure contemplation. The intrusion of a base desire shattered his self-image, and that is what really hurts. If he recognized his actual station—a benoni, not a tzaddik—he would understand that struggling with intrusive thoughts is not failure. It is his job description.
More than that: with every push against the sitra achara below, a corresponding suppression happens in the spiritual realms above. The Zohar in Parashat Terumah says that when the forces of impurity are subdued here in this lowest world, God's glory rises "above all"—more than through any song of praise. God specifically wants worship from this dark world, the Tanya says, because the transformation of darkness into light here is more precious than the natural light of the upper worlds.
Should the sadness, however, not come from worry over sins, but from evil thoughts and desires that enter his mind—if they enter not during Divine service but while he is occupied with his own affairs and with mundane matters and the like, he should, on the contrary, be happy in his portion in that, though they enter his mind, he averts his mind from them in order to fulfill the injunction, “And you will not follow after your heart and after your eyes by which you go astray.”1 Numbers 15:39. The verse does not speak of the righteous, to refer to them as “going astray,” G–d forbid, but of benonim (intermediates) like him, in whose mind do enter erotic thoughts whether of an innocent nature…;2 “…or otherwise.” when he averts his mind from them, he is fulfilling this injunction. Indeed, the Rabbis, of blessed memory, have said, “He who has passively abstained from committing a sin receives a reward as though he had performed a precept.”3 Kiddushin 39b. Consequently, he should rejoice at his compliance with the injunction as when performing an actual positive precept. On the contrary, such sadness is due to conceit in that he does not recognize his position.4 As a benoni, not a tzaddik. Hence he is sad at heart because he has not attained the rank of a tzaddik, inasmuch as the righteous are certainly not troubled by such foolish thoughts. For had he recognized his station, that he is very far from the rank of a tzaddik and would that he be a benoni and not a wicked person even for a single moment throughout his life—then, surely, this is the quality of the benonim and their service: To subdue the evil impulse and thought rising from the heart to the brain and completely to avert the mind therefrom, thrusting the temptation away with both hands, as has been explained earlier.5 Ch. 12. And with every thrust wherewith he expels it from his mind, the sitra achara down below is suppressed, and, since the “stimulus from below causes a stimulus from above,”6 Zohar II:135b. the sitra achara above which soars like an eagle is also suppressed, in accordance with Scripture, “Though you exalt yourself as the eagle…from there I will bring you down, says the L–rd.”7 Obadiah 1:4. Thus the Zohar, Parashat Terumah [p. 128] extolls the great satisfaction before Him, blessed be He, when the sitra achara is subdued here below, for then the glory of the Holy One, blessed is He, rises above all, more than by any praise, and this ascent is greater than all else, and so forth.8 Cf. at length Zohar II:128b. Therefore, no person should feel depressed, nor should his heart become exceedingly troubled, even though he be engaged all his days in this conflict, for perhaps because of this was he created and this is his service—constantly to subjugate the sitra achara. It is concerning this that Job said,9 Bava Batra 16a. See above, beg. ch. 1. “You have created wicked men”—not that they shall actually be wicked, G–d forbid, but that they shall share the temptations of the wicked in their thoughts and meditations alone and that they shall eternally wage war to avert their minds from them in order to subdue the sitra achara; yet they would not be able to annihilate it completely, for that is accomplished by the tzaddikim. For there are two kinds of gratification before Him, blessed be He: one, from the complete annihilation of the sitra achara and the conversion of bitter to sweet and of darkness to light by the tzaddikim; the second, when the sitra achara is subdued while it is still at its strongest and most powerful and soars like an eagle, whence the L–rd brings her down through the effort of the benonim below. This is indicated in the verse, “And make me delicacies such as I love.”10 The words (Genesis 27:4) spoken by Isaac to Esau are allegorically interpreted here according to Tikkunei Zohar. The word mataamim (delicacies) is in the plural to indicate two kinds of gratification, and the words are those of the Shechinah to her children, the community of Israel, as explained in the Tikkunim. The analogy is to material food, where there are two kinds of relishes: one of sweet and luscious foods, and the other of tart or sour articles of food which have been well spiced and garnished so that they are made into delicacies which revive the soul. This is what is alluded to in the verse, “The L–rd made everything for His sake; also the wicked for the day of evil,”11 Proverbs 16:4. meaning that the wicked man shall repent of his evil and turn his evil into “day” and light above, when the sitra achara is subdued and the glory of the Holy One, blessed is He, is brought forth on high. Moreover, even in the case of things that are fully permissible, the more of his impulse that a man sacrifices, even if only for a while, with the intention of subduing the sitra achara in the left part—as, for example, when he wants to eat but postpones his meal for an hour or less, and during that time he occupies himself in the Torah, as is stated in the Gemara12 Shabbat 10a. that the fourth hour is the time when all men eat, but the sixth hour is the time when scholars eat, because they used to starve themselves for two hours with this intention, although after the meal, also, they studied all day; so, too, if he restrains his mouth from uttering words that his heart longs to express concerning mundane matters; likewise with the thoughts of his mind, even in the least way, whereby the sitra achara is subdued below—the glory and holiness of the Holy One, blessed is He, goes forth above to a great extent, and from this holiness issues a sublime holiness on man below to assist him with a great and powerful aid in serving Him, Who is blessed. This is also what the Rabbis meant, “If a man consecrates himself in a small measure down below, he is sanctified much more from above,”13 Yoma 39a. apart from his having fulfilled the positive commandment of the Torah, “Sanctify yourselves, and you shall be holy”14 Leviticus 20:7. by dedicating himself [through abstemiousness] in permissible things. The meaning of “sanctify yourselves” is “you shall make yourselves holy,”15 The Hebrew word for “holy” (kadosh) means “setting apart,” i.e., separating from the unholy. that is to say, although in truth one is not holy and separated from the sitra achara, for it is at its strength and might, as at its birth, in the left part, yet one subdues his evil impulse and sanctifies himself—then “you shall be holy,”16 The imperative form used in the Pentateuch to express the commandments can be interpreted also in the simple future tense. Hence the commandments may be understood from the linguistic aspect as both a command and a promise of its fulfillment. that is to say, in the end one will be truly holy and separated from the sitra achara, by virtue of being sanctified in a great measure from above, and being helped to expel it from his heart little by little.