It is a mitzvah for each individual to set up boundaries for himself that he not transgress the Torah, as it is written, You shall keep [ushmartem] My charge (Vayikra 18:30), which our Sages explain means “Make a safeguard [mishmeret] for My charge” (Moed Kattan 5a). Every individual needs to make personal safeguards to protect themselves from those areas that their Evil Inclination is strongest. This is done by forbidding what is actually permitted so that one does not come to allow that which is forbidden.
One should set a fine for themselves should they cross the barrier they set for themselves, or decide in advance to fast should they not keep their boundary, or some other deprivation the person can handle.
There is one method that I have found to be most effective for staying on the path of Life rather than falling to the grave. Take a piece of paper and write the following: “I herby accept upon myself, without a vow, to read what is written here once a day for the next month, without exception, and if I should fail to read what is written here, I will fine myself by giving a [dollar] for every day that I did not read the text below.” This is what you should read: “Son of Man! Son of Man! Remember your Creator. Remember that you are a Jew. Remember that there is good reward for the righteous and bitter punishment for the wicked, and that the Holy One, blessed is He, deals strictly with people even to a hair’s breadth. Son of Man! Son of Man! Strengthen yourself and be firm against your Inclination, for a person can do whatever they truly wish. Run to a mitzvah and flee from sin. The harder the challenge, the greater the reward. All man’s toil is for his mouth (Koheles 6:7), so guard your mouth and tongue that you not eat non-kosher foods, or foods that might not be kosher and from over-eating; guard your mouth from forbidden speech and even from idle speech, as it is written, You have wearied Hashem with your words (Malachi 2:17). Every haughty heart is the abomination of Hashem (Mishlei 15:5); by contrast, our Sages said, ‘Those who are insulted but do not insult, hear themselves reviled without answering, act through love and rejoice in suffering, of them the Scripture says, But they who love Him are as the sun when it goes forth in its might.’ Let us recognize our low stature and our limited intelligence and the intensity of our sins; let us also rejoice in suffering and thereby fulfill the verse, my sin is before me always (Tehillim 51:5). By so doing we will spare ourselves many evils, anger, quarrels and the like. I have set Hashem before me always (Tehillim 16:8) is a major principle of Torah and I believe with perfect faith that Hashem’s glory fills the whole Earth, so how can I dare go against the will of the High and Exalted, fearsome and awesome King and to brazenly anger Him by doing that which is evil in His eyes?”
Review the text of the Long Confession to see which of the sins you commit regularly and which you do habitually. Then write: “How can I do such an evil thing as such-and-such, which carries this-or-that punishment? How could I have failed to keep this, this and this mitzvahs? Why do I not care about my soul? Why do I not care about the honor of my Creator? Isn’t one hour of Torah and good deeds in This World better than the entire life of the World to Come? And isn’t one hour pleasure in the World to Come greater that a whole lifetime in This World? And the opposite: The suffering of the soul in the World to Come for one hour is worse than a whole lifetime of suffering in This World. And one hour that a person angers his Creator, the exalted King, is a greater misfortune than all the misfortunes of the World to Come. I therefore accept upon myself, without a vow, to be careful about this and this, and to fulfill this and this. If I should transgress any of this today, I will pay a fine of such-and-such for each item. And to atone for my sins that in which I have drowned, I will behave with abstinence and I will deprive myself of such-and-such. May Hashem help me. Assist us, O God of our salvation, for the sake of Your Name’s glory, rescue us and atone for our sins for Your Name’s sake (Tehillim 79:9)!”
On the next day see if you’ve kept your commitment. If you did not, immediately give the fine you set for yourself. Then read the text again and either add or subtract from your commitment in accord with your abilities and with what you see you still need to correct.
Do this daily and monthly without fail. And if you can do this together with a good friend as two God-fearing Jews — how good and wonderful that would be. Try this method and you will see wondrous results, for writing, reading and recalling all this is a great protective wall, stronghold and fortress [against the influence of the Evil Inclination and sin]. Behold. Hashem will stand watch on you!