Regain your control. 1. Recognize that you can. 2. Train yourself to watch yourself, prevent the thoughts at the beginning. 3. Replace the negative thoughts with positive ones. 4. Think of something G-dly. If you know something by heart, that is more effective. Don't relinquish the thought until the negative one is out of mind.