There is a major difference between forgiving and forgetting. When you forgive someone you don't want to ignore the lesson you learned. If someone is not treating you the way you want to be treated then it is time to take back your power with regard to choice. Remember none of us are "stuck" with anyone! You get to choose who you want to spend your time with! You are entitled to have your own "deal breakers" in life.
Start by forgiving yourself for putting you in the same position over and over again. You can't change another person. All you can do is control who you are going to spend time with. Thankfully that is enough.