When the vengeful feelings creep in, refuse to live under their rule, for your own sake.
Instead, be guided by the principle of love.
This is where forgiveness gets tricky. How can you love, or even like, someone who has hurt you? You naturally feel emotions quite different from love, be they fear, anger, resentment, dislike or even hatred. You cannot control what you feel, any more than you can control the weather.
But you can control what you do with what you feel. You can renounce the rule of anger, resentment and hatred, and subscribe instead to the rule of love. This much you can control. This much you can consciously and deliberately decide to do.
Gradually, as you resist the rule of anger, you can develop empathy for your enemy. There is no one you can't develop something like love for if you know their whole story. I know that sounds like an awful stretch when you are talking about people who have done terrible deeds. In those cases, simply begin by letting the principle of love rule your actions, the principle of love for all humankind, not just love for your friends. Then, gradually try to understand where the evil came from. Try to understand how your enemy, who was once an innocent and loving infant, turned into such a monster. As you understand, your hatred will gradually subside, and in its place something like love will start to grow.
Right alongside, you will grow as well.
More ways to find peace of mind and spiritual health.