Use mindfulness to become aware of these negative thoughts as they arise. For example, when the first thought of anger arises, notice it and don’t let it multiply. Instead, remember what happened in the past when you were overwhelmed by anger. Based on your direct experience, see the suffering and problems anger caused you and recognize its defects. You can crush anger using antidotes once you clearly see it as something destructive.
You can find a particular antidote to destroy each afflictive emotion. To conquer desire, you can meditate on the unappealing aspects of the object; for hatred, meditate on loving-kindness; for jealousy, joy; and so on. This is how you discard negative mental factors.
From The Great Medicine That Conquers Clinging to the Notion of Reality by Shechen Rabjam, pages 67-68