*It is forbidden for a man to engage in sexual fantasies. This applies to single men, and to married men alike. Not only is a married man not allowed to fantasize about other women, he is also not to preoccupy himself with sexual fantasies regarding his wife. Many men are lax in this matter, falsely believing that everything is permissible with one’s wife.
*It is stated in the Shulchan Aruch (Aven HaEzer, 23:3) that it is forbidden for a man to purposely cause himself an erection, or to engage in a sexual thoughts. Rather, if sexual thoughts enter his mind, he should distract his heart from vanity and occupy himself with Torah which is filled with exquisite love and charm.
*This prohibition is based on the Talmud which states (Niddah 13A) that whoever willfully causes himself an erection is sentenced to excision. Someone who purposely engages in sexual thoughts is not brought into the palace of the Holy One Blessed Be He.
*This prohibition is also found elsewhere in the Talmud (Ketubot 46A, and Avodah Zara 20B) where Rabbi Pincus Ben Yair teaches that the Torah verse, “You shall guard yourselves from all evil things,” means that a man should not engage in fantasies during the day and bring himself to impurity (via a seminal emission) at night.
*The prohibition against engaging in sexual fantasies is also implied in the Torah prohibition, “You shall not stray after your hearts and your eyes which cause you to go astray,” (Bamidbar, 15:39). The Talmud states (Berachot 12B) that straying after one’s eyes is looking at something that brings one to a sexual thought.
*According to the Ramban and Rabbanu Yona, the prohibition against sexual fantasizing, “You shall guard yourselves from all evil things,” is included in the 613 mitzvot of the Torah, and includes having sexual thoughts about one’s wife when not during marital relation. Fantasies are forbidden even if a person does not intend to act on them, even imagining an immodest image in one’s mind is forbidden. Also, the Rambam agrees that these are all Torah prohibitions, stating that they stem from the commandment, “You shall not stray after your hearts and your eyes which cause you to go astray.”
Sexual fantasies are worse than the act itself
*The Ramban states in his “Ageret HaKodesh,” that to understand how sexual fantasies are worse than the act itself, one has to realize that when a man thinks about evil and impure matters, his thought and soul are connected to the upper worlds, and in polluting the upper worlds with his impure thoughts, he is held guilty by the Celestial Court.
*The holy Hasidic master, the Baal Shem Tov, was wont to say that a man is what he thinks. If he thinks about pure matters, he is purified, but if he thinks about impure matters, he is impure. Since the essence of a man, and what distinguishes him from beasts, is his power to think, and the faculty of thought is directly related to the soul, if a man thinks polluted thoughts, he pollutes his soul and very essence.
*It is noted in the “Tanya” that when a person has forbidden fantasies, he makes himself into a chariot for the forces of impurity.
*One can understand the teaching of the Talmud (Yoma 29A) that sexual fantasies are worse than the act itself since a person can engage in an infinite number of sins in his mind, whereas, in contrast, engaging in a forbidden sexual act is more difficult since it requires many other elements to carry out. Also, a person will often refrain from carrying out forbidden sexual acts because of shame or in fear of getting caught, factors which don’t apply to thoughts.
Pollution of the soul
*It is written in the “Sefer Haredim” that sexual thoughts pollute the soul, even if the person does not intend to commit the sin, the thought of the mental image alone causes a blemish and distances the person from G-d. A person’s impure thoughts pollute his whole being, just as when a person enters a dirty place and soils his garments, he will be ashamed to come before a king. Therefore, one must guard oneself from straying after one’s heart and one’s eyes.
*All of the above applies to a man who willfully thinks unchaste matters or purposely dwells on immodest images in his mind. However, if a sexual thought should chance against his will, and he immediately repels it from his mind, he is not considered to have sinned. On the contrary, he has performed the commandment not to stray after one’s heart and eyes by pushing the thought from his mind. It is only when a person knows that a thought is improper, yet he allows his mind to dwell on it, that he is held accountable for his transgression. But should a sexual thought arise without warning, and a man recognizes that the yetzer is at work and expels the thought from his mind, then he has done the mitzvah of not straying after his heart, for the Holy One Blessed be He is not overly demanding of his creations (Avodah Zara 3A), and it is considered as if the man has been innocently forced against his will.
*In truth, a man should strive to purify himself so that a thought of forbidden sexual matters should revolt him completely, but this is a difficult level to reach. Therefore, if a man is pulled with a feeling of lust toward the forbidden thought or image in his mind, and he repulses it, without dwelling on it, or deriving further enjoyment from it, then no transgression is attributed to him and he is accredited with a mitzvah.
*In repenting over evil thoughts, it is proper to increase good thoughts in their place, for good and holy thoughts atone for evil thoughts and imaginations.
*Our Sages stressed the importance of avoiding sinful thoughts, and even though they were holy saints removed from material passions, they personally guarded themselves stringently from tempting situations, as can be seen in the following Gemara where a woman was walking in front of two Sages of old: “Rav and Rav Yehuda were walking on the road, and a woman was walking in front of them; said Rav to Rav Yehuda, ‘Let us hurry ahead of her lest we be tempted and fall into hell.’ Rav Yehuda protested, ‘You yourself said that in the case of G-d fearing people it is all right to walk behind a woman.’ Rav replied, ‘Who says that we are G-d fearing people?’” (Kiddushin 81A). How much more so should we guard ourselves from temptation, we who are so lowly, if the early Sages were like angels, we are not even like donkeys – how many strategies must we adopt to save ourselves from sinful thoughts! (“Taharat HaKodesh,” Shmirat HaBrit, Ch.5)
*One should be careful to avoid looking at or reading newspapers, magazines, novels, stories, television, movies, Internet, and similar things that may have provocative material that can stimulate erotic thoughts. One should also avoid people who speak in an unchaste fashion. For seeing an erotic image, or hearing some immodest remark, can pollute a person’s mind for a lengthy time. It goes without saying that a person should be especially careful to avoid seeing immodest pictures and the like. Regarding this, it is wise to pray before one begins one’s day (or a session on the computer) that one not fall prey to forbidden images, like King David who prayed, “Keep my eyes from seeing vanity.” (Excerpted from the book, “Taharat HaKodesh,” Chapter on Shmirat HaBrit, 5).
*One of the strategies of the evil inclination is to entice a person into imagining how someone else, or some couple, behaves in sexual matters, whereby the mind draws up all kinds of imaginations and pictures.
*The main intent of Hashem’s command to take revenge against Amalek and Midian was for their having led Israel to fall into temptation through their immodest words and actions that brought Israel to succumb to lustful fantasies.
*Our Sages imposed many warnings so that a man shouldn’t fall into sinful thoughts, such as not to gaze on women washing laundry, nor on their clothes hanging to dry, nor on a small finger of a woman which they compared to gazing on her private place, not to employ a female servant, nor to greet a woman shalom, nor engage her in unnecessary conversation, nor to gaze upon animals when they are having relations, and many other fences to keep a man from fantasizing. Many men say to themselves that by gazing at and talking to women there is no sin, for this is the way of the world, but they transgress the words of our Sages and bring impurity on themselves in doing so. Therefore, whatever a man can do to safeguard himself in this regard is certainly praiseworthy.
*It is wise practice to distance oneself from all temptations, since a person is easily snared in their net, and this will bring elevation to his soul and to his mazal (fortune), and guard him from the dangers and misfortunes of the time, and grant him spiritual and material reward, and blessing in this world and the next.
*The Rambam stresses that forbidden thoughts only rise in a heart that is empty of wisdom. Therefore, when forbidden thoughts arise, one should replace them with words of Torah. (Rambam, Laws of Forbidden Relations, see the end).
*The main reason for sexual fantasy and sins stems from a mind that is not occupied with thoughts of Torah, and when a person does not strive to renew his Torah learning for its own sake. When the mind ceases to be occupied with Torah, profane matters take its place, and this leads to sinful fantasies. But when the mind is occupied with new advances in Torah, there is no room for extraneous rumination. Thus a person should strive to always fill his mind with Torah, and this is a great tikun for blemishes to the Brit, because it was the impure reflections in his mind that led to spilling seed in vain, and now he is redressing the wrong by filling his mind with the holiness of the Torah.
*It is an especially helpful remedy to fill one’s mind with a broad and deep understanding of Torah, to explore its inner wisdom, and, for those who are qualified, to taste its secrets, for a deeper learning will lead to greater purity and a greater fear of Heaven.
Other aids to guarding one’s thoughts
*Pray to Hashem to save you from sinful thoughts.
*Tell your Rabbi or teacher that you are having trouble with fantasies.
* Keep yourself occupied when you are not learning Torah.
*Think that if someone tried to publically force you to have sinful thoughts and look at forbidden images, you would be prepared to sacrifice your life to sanctify the Name of G-d.
*Channel your passions into a yearning for G-d.
*Impose monetary fines on yourself for each time you succumb to temptation.
*Don’t dwell on bad thoughts.
*Impose some sort of flagellation or deprivation on yourself, like fasting, or immersing in a cold mikvah, or giving up something that you like.
*Read books about repentance.
*Strive to be always happy and confident in Hashem.
*Meditate on the letters of the Divine Name.
*In your mind’s eye, imagine a picture of your parents.
*Make a promise to give charity.
*Make a daily private vidui (confession) over one’s sins.
*Repeat the verse: “You shall guard yourself from every evil thing.”
*Repeat the verse: ““You shall not stray after your hearts and your eyes which cause you to go astray.”
Remember, someone who strives to sanctify himself even a little, is granted great sanctity and assistance from Above.
[Based on Chapter 20 of the book, “Kedusha and Tzniut” by Rabbi Daniel Frish, author of the commentary on the Zohar, “M’Tok M’Dvash”]