I've also been experiencing something similar, when i'm either feeling on top of the world, or as everyone hates me. I just try to think that I'm being in rational, and i will feel better soon, and bad one passes and it gets better. Hope You'll manage to find balance. I try not to act on emotions, just wait till I clear my mind, just a kind of meditation, just sitting and listening to silence, it calms me down.