Sefer HaMiddot· Rabbi Nachman of Breslov
Sefer HaMiddot, Thoughts II:23
23. To nullify thoughts of promiscuity, let him picture the image of his father. A counsel for improper thoughts: to become angry about something, and the hint is: "Tremble, and do not sin." (I heard from Rabbi Nachman, of blessed memory, explicitly, that the intention is to be agitated and angry at oneself. And this is hinted in the words of our Sages, of blessed memory: "A person should always incite the good inclination against the evil inclination, as it says: 'Tremble,' etc.," that is, to be agitated and angry at oneself; but God forbid to actually become angry, for the sin of anger is very severe, as is known.) Also a segulah: to move from his place and go to another place; also it is good to jump from his place.
View original Hebrew
כג. לְבַטֵּל הִרְהוּרֵי זְנוּת, יְצַיֵּר דְּמוּת אָבִיו. עֵצָה עַל הִרְהוּרִים, לִכְעס עַל אֵיזֶה דָּבָר, וְרֶמֶז: "רִגְזוּ וְאַל תֶּחֱטָאוּ".·. (שָׁמַעְתִּי מֵרַבֵּנוּ, זִכְרוֹנוֹ לִבְרָכָה, בְּפֵרוּשׁ, שֶׁהַכַּוָּנָה לִרְגּז וְלִכְעס עַל עַצְמוֹ. וְזֶה מְרֻמָּז בְּדִבְרֵי רַבּוֹתֵינוּ, זִכְרוֹנָם לִבְרָכָה: לְעוֹלָם יַרְגִּיז אָדָם יֵצֶר טוֹב עַל יֵצֶר הָרַע שֶׁנֶּאֱמַר; "רִגְזוּ" וְכוּ', הַיְנוּ לִרְגּז וְלִכְעס עַל עַצְמוֹ, אֲבָל חָלִילָה לִכְעס מַמָּשׁ, כִּי עֲווֹן הַכַּעַס חָמוּר מְאד כַּיָּדוּעַ). גַּם סְגֻלָּה, לְנַתֵּק מִמְּקוֹמוֹ וְלֵילֵךְ לְמָקוֹם אַחֵר, גַּם טוֹב לִקְפּץ מִמְּקוֹמוֹ.