This is something I struggle with myself.
I agree that self-forgiveness is key. For me, part of doing that is finding "redemption" through figuring out what Iíve learned from my mistakes and then applying it to the present. I have found there is always something to be learned, even if the fault lies mostly with another and not myself. For example, if someone insults me, and I fail to defend myself, instead of beating myself up over my failure, something I tend to do, I try to use the experience to think of new strategies on how I would handle the scenario, or a similar one, were it to happen again. I also try not to treat others as Iíve been treated, knowing all too well how it feels to be on the other side. Although not a cure all, this helps calm feelings of resentment and bitterness towards the person who caused me pain, another tendency of mine, as well as myself.
That said, old habits die hard, and often I make the same mistakes over and over again. It takes repetition to see the big picture sometimes. And as we know, we're imperfect beings living in an imperfect world. I try to go easy on myself - try being the operative word.