When training the mind persistent, distracting thoughts sometimes arise. Distracting thoughts are thoughts of desire, or hate, or confusion. Here are five tools for dealing with distracting thoughts.
1. When these kinds of thoughts arise, try turning the mind instead to wholesome thoughts. This helps the mind become peaceful, quiet, and concentrated. Like a skilled carpenter who uses a smaller peg to remove a large peg, but wholesome thoughts to deal with distracting thoughts.
2. If this doesn’t work, try instead to mull over the problem with these kinds of unwholesome thoughts. Remind yourself that kind of thinking leads to suffering. This kind of skillful thinking also can help the mind become peaceful, quiet, and concentrated. A well-dressed young person would be disgusted and embarrassed to have the dead body of an animal or person hung around their neck. In the same way, remind yourself how dangerous and awful it is to have those kinds of thoughts chained to your mind.
3. Another technique is to simply put those thoughts out of your mind. Simply refusing to give them your attention helps the mind become peaceful, quiet, and concentrated. In the same way that you can close your eyes to things you don’t want to see, close your mind’s eye to thoughts you don’t want to think.
4. A fourth technique is to try to look at the root cause of these thoughts. Sometimes when you clearly see the root cause of a distracting thought, it goes away on its own. If someone was walking fast, they might ask themselves, “Why am I running? Why not just walk?” From there, they progress to, “Why not just stand? Or better yet, sit? Or why not just lie down?” Just as a person running could progressively relax themselves by considering the reasons for their actions, you can become progressively more peaceful, quiet, and concentrated by considering the cause of distracting thoughts.
5. If the other 4 techniques don’t work, all that’s left to do is to clench your teeth, press your tongue to the roof of your mouth and crush your thoughts with pure willpower. Like a strong man could grab a weaker man in a headlock and constrain him by sheer force, constrain your thinking mind with pure willpower.
When you master these techniques, you have mastered your own mind. You will think about things that you want to and not be distracted by anything else.
from Majjhima Nikaya 20