I watched Ajahn Brahmali’s talk about Right Effort recently, and in it he discusses MN 20. The last method the Buddha gives in that sutta to get rid of unwholesome thoughts is:
Now, suppose that mendicant is focusing on stopping the formation of thoughts, but bad, unskillful thoughts connected with desire, hate, and delusion keep coming up. With teeth clenched and tongue pressed against the roof of the mouth, they should squeeze, squash, and torture mind with mind.
One more instance of borrowing from main stream meditation was pointed out in § 1.2, above. We saw that at one place in the Majjhima Nikaya ( Vitakkasanthana Sutta, nr 20; MN I.120-21) monks are advised to do what is shown to be incorrect elsewhere (MN I.242; and therefore in the Original Mahasaccaka Sutra). It refers to the kind of meditation which consists of “closing the teeth, pressing his palate with the tongue, restraining thought with the mind, coercing and tormenting it”, in short, main stream meditation.
Honestly, that method has always seemed really out of place to me.