It amazes me how often we interpret people's behavior in ways that makes them more villainous than they really are. I think that most times when people do things that hurt my feelings, get on my nerves or offend me, they probably: 1) are not even thinking about me, 2) intended something else, 3) may be preoccupied, and 4) are definitely not trying to hurt me; and I am: 1) self absorbed and thinking about myself excessively and/or 2) Hungry, Angry, Lonely and/or Tired, in which case should follow the AA acronym HALT and take care of those things before talking to them about it or taking any kind of action.
If people constantly try to hurt you, get them out of your life. If they have your best interest at heart, when they hurt you just assume that they were trying to do something well intended that you haven't considered but that may have gone awry. You'd want the same consideration.