It's not a bad thing to have mood swings. I have them, too. But I'm more controlled.. but there are times where I go out of control..
But anyway, I believe mood swings are a bunch of emotions bursting out at once. A ton of it goes through you, and it's not a bad thing. It just affects your relationship with people, negatively. And it affects you and people when your at school, work, or outside. Remember, people do not always purposely try to anger or upset you.
Try urge surfing. Try mindfulness exercises that calm you down. Like resist urges (Or meditation). When you have somewhere that itches, sit calmly and tell yourself, "It will pass soon." And if you try to distract yourself or talk yourself out if it, you're just fighting the urge, and fighting it is basically feeding it. You don't want to give in. So calmly think over it. It will pass by. It's not a big deal. (But if it's for different reasons, and if you believe it's a big deal, then it is completely fine to allow your moods to be revealed, just think about the consequences and feelings of other people.)
It's the same with mood swings. It's just a temporary mood. It will pass. Why waste energy on someone who didn't intentionally try to anger you. You'll just cause friction in the relationship between that person, you'll cause a negative reputation of yourself, and you won't be able to be make friends as easily.
If someone is annoying you, don't give in to their satisfaction by fighting back. Just simply take a deep breath or think about the good things in your life, and slowly and calmly just resurface back to yourself.
It's extremely difficult. I haven't mastered it, yet. But with much practice, you can calm yourself as easily. Just be aware of mindfulness. Once you're aware, your mind will always ask "Is this a big deal?"
Hope this helps.