I have mood swings too. Imagine: The Incredible Hulk having period. THAT'S ME!. What I do? When I have mood issues. I get away from people for a while. I gather myself and meditate. Then, I go find something that I KNOW will make me feel better and happy about myself. Like? watch a movie. Ride a bike. Bathe in the glow of the warm and fuzzy sunshine. Those stuff. GET BACK TO YOUR OLD HAPPY SELF. :-)
You can prevent mood swings by exercising and keeping your weight in check. In addition, get enough sleep, avoid excessive amounts of stimulants and eat foods that can improve your mood like chocolate. Read more: www.livestrong.com/article/18755-prevent-mood-swings/.
That's not exactly your fault, you could have bipolar. Some researchers recently did a study that showed that people can control their mood swings though.
What I do is tell myself that I WILL NOT get mad and sad, and keep myself busy to stay in a good mood. Sometimes boredom and thinking negative thoughts can really set mood swings off. ~Ninja Jackie-san