MN 20 Vitakkasanthana Sutta : The Removal of Distracting Thoughts
Thus have i heard.
On one occasion the Blessed One was living at Savatthi in Jeta's Grove, Anathapindika's Park. There he addressed the bhikkhus thus: "Bhikkhus, when a bhikkhu is pursuing the higher mind, from time to time he should give attention to five signs. What are the five?
(i) "Here, when a bhikkhu is giving attention to some sign, and owing to that sign there arise in him evil unwholesome thoughts connected with desire, with hate, and with delusion, then he should give attention to some other sign connected with what is wholesome instead. Then evil unwholesome thoughts connected with desire, with hate, and with delusion are abandoned in him and subside. With the abandoning of them his mind becomes steadied internally, quieted, brought to singleness, and concentrated. Just like how a skilled carpenter might remove and extract a coarse peg by means of a fine one so too...when a bhikkhu gives attention to some other sign connected with what is wholesome...his mind becomes steadied internally, quieted, brought to singleness, and concentrated. "
(ii) "If while he is giving attention to some other sign connected with what is wholesome but there still arise in him evil unwholesome thoughts connected with desire, with hate, and with delusion, then he should examine the danger in those thoughts thus: 'These thoughts are unwholesome, they are reprehensible, they result in suffering.' As he examines the danger in those thoughts, then any evil unwholesome thoughts connected with desire, with hate, and with delusion are abandoned in him and subside. With the abandoning of them his mind becomes steadied internally, brought to singleness and concentrated. Just like a young youthful man or a woman and fond of ornaments, would be horrified and disgusted if the carcass of a snake or a dog or a human being were hung around his or her neck, so too...when a bhikkhu examines the danger in those thoughts.. .his mind becomes steadied internally, brought to singleness, and concentrated.
(iii) "If while he is examining the danger in those thoughts, there still arise in him evil unwholesome thoughts connected with desire, with hate, and with delusion, then he should try to forget those thoughts and should not give attention to them. Then any evil unwholesome thoughts connected with desire, with hate, and with delusion are abandoned in him and subside. With the abandoning of them his mind becomes steadied internally, quieted, brought to singleness, and concentrated. Just like a man with good eyes who did not want to see forms that had come within range of sight would either shut his eyes or look away, so too...when a bhikkhu tries to forget those thoughts and does not give attention to them...his mind becomes steadied internally, quieted, brought to singleness, and concentrated.
(iv) "If while he is trying to forget those thoughts and is not giving attention to them, there still arise in him evil unwholesome thoughts connected with desire, with hate, and with delusion, then he should give attention to stilling the thought-formation of those thoughts. Then any evil unwholesome thoughts connected with desire, with hate, and with delusion are abandoned in him and subside. With the abandoning of them his mind becomes steadied internally, quieted, brought to singleness, and concentrated. Just like a man walking fast might consider: 'Why am I walking fast? What if I walk slowly?' and when he is walking slowly; then he might consider: 'Why am I walking slowly? What if I stand?' and he would stand; then he might consider: 'Why am I standing? What if I sit?' and he would sit; then he might consider: 'Why am I sitting? What if I lie down?' and he would lie down. By doing so he would substitute for each grosser posture one that was subtler. So too...when a bhikkhu gives attention to stilling the thought-formation of those thoughts...his mind becomes steadied internally, quieted, brought to singleness, and concentrated.
(v) "If while he is giving attention to stilling the thought formation of those thoughts, there still arise in him evil unwholesome thoughts connected with desire, with hate, and with delusion, then, with his teeth clenched and his tongue pressed against the roof of his mouth, he should beat down, constrain, and crush mind with mind. Then any evil unwholesome thoughts connected with desire, with hate, and with delusion are abandoned in him and subside. With the abandoning of them his mind becomes steadied internally, quieted, brought to singleness, and concentrated. Just like a strong man might seize a weaker man by the head or shoulders and beat him down, constrain him, and crush him, so too...when, with his teeth clenched and his tongue pressed against the roof of his mouth, a bhikkhu beats down, constrains, and crushes mind with mind.. .his mind becomes steadied internally, quieted, brought to singleness, and concentrated.
"Bhikkhus, by following the instructions above; this bhikkhu is then called a master of the courses of thought. He will think whatever thought he wishes to think and he will not think any thought that he does not wish to think. He has severed craving, cut off the fetters and with the complete penetration of conceit he has made an end of suffering."
That is what the Blessed One said. The bhikkhus were satisfied and delighted in the Blessed One's words.
In summary, Buddha taught the monks five ways to remove distracting thoughts. Should evil unwholesome thoughts associated with greed, hatred and delusion arise in them , they should: 1. Give attention to thoughts that are wholesome and associated with generosity, loving kindness and wisdom. 2. Examine the dangers associated with the unwholesome thoughts and abandon them 3. Forget those unwholesome evil thoughts and should not give attention to them 4. give attention to stilling the thought-formations of those evil unwholesome thoughts 5. With determination, clenching the teeth; he should beat down and constrain those evil thoughts.
References: 1. www.accesstoinsight.org 2. https://suttacentral.net/ 3. The middle length discourses of the Buddha (Bhikkhu Bodhi)