When you realize that it is much more pleasant to forgive than to let hate and anger poison the quality of your existence, it becomes possible to forgive. Forgiveness does not mean you trust someone who is not trustworthy, or that you allow people to harm others or yourself with impunity, or that you allow others to treat you like a doormat. Forgiveness means you let go of the unpleasant feelings that poison the quality of your existence. You can take appropriate measures to protect innocent people and help offenders learn, but you do it out of love not hate or anger.
Forgiveness leads to non-attachment. A large part of what some people call "enlightenment" is forgiveness. When you understand the power of forgiveness, you will want to forgive everything and everyone because it results in a more pleasant existence. At the root of all attachments is liking and disliking. When you want something you don't have or don't like something you do have, you might blame another person, fate, the universe, God, yourself, or some such object of blame. When you forgive that object of blame, you let go of your anger and desire and you develop non-attachment. Try to forgive other people for doing things you don't like. Forgive fate or God for bringing things into your life that you don't like. Forgive yourself for falling short as you try to live up to the expectations you have for yourself.
It can help you forgive others if you try to understand why someone would do what they did. How did they learn to be the way they are? Were they victimized in their past? If you can remember when you made a mistake, it can help you understand why someone else might make a similar mistake. Periodically reminding yourself, "Forgive everything" or "Forgive others, forgive fate, forgive yourself" can help too.
Meditating daily can also help you to develop forgiveness and non-attachment.
Revenge will not bring you advancement in the afterlife. Forgiveness will. Turn adversity into advancement by forgiving.