You need to realize that you can change your state of being at any point (happy, sad, etc)
Next time you are in this funk, just pretend physically that you aren't. (How would you stand if you could communicate, where would your eyes go, your arms, legs, what would you be thinking about, would your head be up or down). Get into the physical position of not being in that funk, and then watch the magic happen.
Example: I'm sure you have been depressed at some point in your life. You notice how its really hard to be depressed when you are standing up tall with your head held high?
Also, look into meditation, I do breathing exercises regularly and they have done wonders for controlling stress and meltdowns.