One of the best ways to ensure happiness is to not rely on someone else to make you happy. Most of the time people aren't hurting us intentionally... We just interpret their actions incorrectly and take things way too personally. If you stop and think about it, it's kind of selfish. We assume that it's all about us, and most of the time, it's not. When people do or say things that are against you, it says more about who they are rather than who you are. You have to be a little thick-skinned. Don't take things too personally. Don't let your feelings get hurt. Let bad things, bad situations and bad people bounce right off of you without leaving a mark. Don't let the bad behavior of others define you or your attitude. Just let it go.
I'll admit, this is easier said than done. But I'll also tell you it gets a lot easier with age. When you're young it's difficult to "turn the other cheek" and not wallow in sadness with a damaged psyche, or low self-esteem. But you should know that it's a lot better way to live your life... and with some practice you'll get really good at it.
(PS - Do you like the Rhinoceros? They have the thickest skin of any terrestrial mammal. -- About 1 inch thick. They don't get their feelings hurt easily!)