how to forgive someone

How do you forgive someone who has hurt you? your not mad at the person it's just Everytime you think your able to talk and be cool with this person you think about the hurt this person has cost and you get mad all over again and can't talk to this person or be cool with this person.