It happens with all of us at one point or other. Someone wrongs or wounds us and we get in to resentment. In resenting, we re-feel the injury. And re-hurt ourself. The more we resent, more we get hurt. A person who bears grudge is 'like one who, having cut one hand while handling a knife, avenges himself by stabbing the other hand.'
The best way to avoid this self inflicting suffering is to apply 'spiritual iodine' the moment anybody hurts you! Get your resentment healed at once, before it starts further hurting you!
Here is a old but good solution- Think no evil about anyone. Put the best possible construction upon every one's actions. Send out a kindly thought towards any person antagonistic to you. Think hopefully at all times. See only the best happening.
Avoid resentment, remember it's like touching your wound over and over again. It causes more loss to you than to other person.