kind of like what others said, but I want to add that sometimes I will impulsively do hurtful things to a close friend if I feel they did something bad to me. In the end I realize that sometimes they did not mean to offend me.
It could be that if you are unkindly treated, it is because of something you did without knowing it. It's a natural law of cause and effect. Energy is neither created nor destroyed. Although sometimes you genuinely did not provoke something, in the wrongdoer's mind there is usually a reason.
If the reason is stupid, they don't deserve your love. As much as they are human, there are people out there who are better deserving of your attention - people who could really appreciate your presence.