Just take a deep breath. Breathe in, and breathe out. You'll feel a bit better. As for the person that put you in the bad mood, well try to talk to them as little as possible until you're in a better mood. Otherwise, you might end up yelling and screaming, and just going crazy at them with all the hate you feel at the moment. Or if you can, just leave that place for a little bit so you can go out, relax, and clear your head. It's not always possible though. But do what you can, that will work for you.
Also, just because you're in a bad mood, that doesn't mean that you have to take your mood out on everyone else. Your friends didn't do anything wrong. They didn't put you in the bad mood. So why bitch at them, why make them feel like shit too? Talk to them as if you would on any other normal day, and keep your bad mood to yourself. And if you really can't take it, then simply tell them you want to be left alone for the day because you're not in the best of moods. If they are your friends, they will understand.
But rather then having a frown on your face, it's much easier to smile. So you can even just let the bad mood pass within a few minutes and go back to being your happy self! So turn that frown upside down, and let the world see you smile!
"A smile confuses an approaching frown."
Happy thoughts everywhere...