I read your original post more as a question about how you, personally, can deal with how people speak/act to you, rather than what (else) you can do to stop those things happening. The below has been written from that perspective.
A lot (not all) of the time, you can't change other people. You can act in certain ways that make people less likely to be dicks to you (that would need a separate post) but, in the end, some people will still be dicks to you. It's life, sadly.
What you can control is how you react to people being dicks to you. You seem to be worried that your current way of reacting to it is not a healthy way (i.e. you let it get to you/take it personally/whatever).
I tend to focus on two things:
1) Most people, deep down, are good. That's pretty much just a personal belief, but it works for me. Nobody wakes up in the morning and says to themselves, "You know what? Today, I'm going to be a complete bastard to everyone else." That just doesn't happen. Most people
try to be good people. What we perceive as other people being dicks is actually (to me) simply their confused efforts to be good. Things get in the way of people being good. Maybe they had a rough day. Maybe their cat/dog/hamster died. Maybe they had a bad childhood that's left them with a different idea of what behaviours result in 'goodness'. It's very difficult for us, as individuals, to ever know what's truly going through someone else's head - we can only ever observe the resulting behaviours. If you can bring yourself to believe that those behaviours don't reflect badly on you, or on the person displaying them, but simply illustrate a difference in how that person tries to 'be good', it becomes a lot easier to deal with. They're not being a dick to you - they're trying to be good, but something's twisted them around so that they're making a hash of it. You end up not feeling angry with them so much as sympathetic. It's hard to be good in a way that other people understand.
2) If that doesn't work and you still get angry about it, I like to imagine that everybody is secretly being controlled by a little alien bastard who's managed to sneak inside their brain when they weren't looking - a little bit like a more douchebag-y version of Heinlein's
Puppet Masters. Inside, the person who's acting dickishly towards you is incredibly embarrassed at what they're doing, but the little alien bastard temporarily has control and they can't stop it. Later on, when they get control back (which could be years from now), they'll be really upset at what it made them do...but, right now, they're dicks. It's not their fault.
Those two philosophies have gotten me through quite a lot of moments where I otherwise would have been incredibly aggravated or depressed. Use as you see fit.