M20: The Discourse on the Removal of Thoughts (Vitakkasaṇṭhāna Sutta) – Summary
When thoughts related to lust, hatred, or delusion arise:
Replacement
Replace them with wholesome thoughts, such as the Four Immeasurables (loving-kindness, compassion, empathetic joy, and equanimity).
Contemplation of Danger
Clearly see the danger and harmfulness of those thoughts.
Shifting the Object of Mindfulness
Do not give attention to the thought; turn the mind to another object.
Calming Thought-Formation
Attend to calming the formation of those thoughts.
Strong Restraint
If the preceding methods have not worked, with the teeth clenched and the tongue pressed against the roof of the mouth, restrain the mind with the mind.