רִגְז֗וּ וְֽאַל־תֶּ֫חֱטָ֥אוּ אִמְר֣וּ בִ֭לְבַבְכֶם עַֽל־מִשְׁכַּבְכֶ֗ם וְדֹ֣מּוּ סֶֽלָה׃
Трепетать и не грешить; общайся со своим сердцем на своей кровати и будь спокоен. Села
Mareh Yechezkel
And behold the Rabbis, may their memory be blessed, said (Berakhot 5a), “If this wretched one, (the evil inclination), encounters you, pull it into the study hall. If it leaves, excellent; if not, he should recite Shema. If it leaves, excellent; if not, he should remind himself of the day of death.” And they attached it upon that which is written (Psalms 4:5), “Tremble, and sin no more, etc.” And the question [about this] is already well known: Why should one occupy himself with Torah and recite Shema, when there is a doubt if that will be effective? Let him immediately remind himself of the day of death, which is something easy and certainly effective! But, in fact, it is not a question at all, as all of [these steps] are necessary. For reminding himself of the day of death without Torah does not help at all. Just the opposite – it is written (Psalms 73:4), “For there are no pangs at their death; their body is firm.” And the Sages, may their memory be blessed, expounded (Shabbat 31b), “They know that they will die, and their hearts are as unyielding for them as a hall [is wide].” As it is understood that it is just the opposite – since they know they will die, their hearts are firm to fulfill all of their desires. For they will say, “Eat and drink while we have the power, for tomorrow we will die; and there are neither actions nor accounting after death. So therefore now is the time to eat and drink and to do all of the abominations.” And if that is so, it is certain that reminding himself of death will not save him from sin. Rather it will only do so after he has studied Torah. And through that, he will come to the level that he can recite the Shema – meaning that he will accept the sacrifice of his life for the commandments of God. And, then, reminding himself of the day of death will certainly be effective to save him from sin.
Tzava'at HaRivash
Before falling asleep, lie down with dread and awe, quaking and trembling from the fear of the Creator, blessed is He. Through this you will not come to sin, as the verse states,46Psalms 4:5; Talmud Bavli, Brachot 5a; Zohar Vol. 3, 113b “Tremble and sin not, reflect in your hearts while on your beds.”
Sefer HaMiddot
23. To nullify promiscuous thoughts, one should imagine the image of his father.
Good advice regarding evil thoughts is to get mad about something. This is alluded to in the verse, "Rage and do not sin". [I heard from our master, of blessed memory, that the intent is to rage and get angry at oneself. This is hinted at in the words of our rabbis, of blessed memory: A person should always enrage his good inclination over his evil inclination, as it is written, "Rage ..", that is, to rage and get angry at oneself. But not to, G-d forbid, actually get angry, because the sin of anger is extremely grave, as is known.] It is also a segula (conducive) to uproot from one's place and and go to another place. It is also good to jump from one's place.
Good advice regarding evil thoughts is to get mad about something. This is alluded to in the verse, "Rage and do not sin". [I heard from our master, of blessed memory, that the intent is to rage and get angry at oneself. This is hinted at in the words of our rabbis, of blessed memory: A person should always enrage his good inclination over his evil inclination, as it is written, "Rage ..", that is, to rage and get angry at oneself. But not to, G-d forbid, actually get angry, because the sin of anger is extremely grave, as is known.] It is also a segula (conducive) to uproot from one's place and and go to another place. It is also good to jump from one's place.