Sometimes, a relationship can get ugly. Whether it's a friendship crumbling over a fight about something, or a long term relationship that ended badly, sometimes things can get ugly and horrible. That's when the words that we don't mean to say are said, and the moments that we wish we can take but never can truly take back happen.
However, treating people like they are your mental punching bag is wrong. If you're just going off the deep end, for some odd reason, note that you are hurting others and the people that you are hurting have feelings as well. Feelings are something that you have to realize that you are not the only one who possesses them. If you are feeling upset, talk to someone. Not yell at them.
Ever heard of the golden rule? I think that they teach that in kindergarten. The point of the matter is that you should follow that golden rule when you are talking to people. Sometimes, the things we say, although we may or may not mean them may cause someone else to get hurt emotionally.
However, one may argue that everyone has their bad days. Everyone has them, it's a natural part of life. No one is happy for everyday of their life. The bad days are when you want to cuddle up with your dog and watch endless amount of happy movies. (Okay, I'm guilty of this) On these days, one can safely say that one isn't in their right state of mind, therefore one should be able to be forgiven for their wrongdoings, because we're human.
There is a line that sometimes people cross between having bad days, and just coming off as rude, and being horrible to the world around them. When the people around us don't treat us the way that we want to, we have the right to tell them and say hey you hurt me. One thing though with that: there could be an extreme consequence to that, especially when that person may have a lot going on behind closed doors. But if they are truly hurting your feelings, I'd encourage you to talk to them about it if possible, because they won't know that their doing it until you bring it up to their attention.
The bottom line? Don't treat people like their worth nothing. Respect them, as you would want them to do to you. If you're mad, then use nice words. Know when someone's being a jerk, and someone's being a jerk due to their background lives that they don't present in the day to day showcase. Learn to know the difference.