In order to get rid of a bad mood you must first clear your mind.
Meditation is the key.
Turn on some relaxing music, close your eyes, and get into a comfortable position. Imagine a blank space and then fill it up with whatever image you prefer.
Focus on that image and do not let it sway from your mind. Stay focused on that image for as long as you can. 20 minutes is probably right around the correct amount of time.
As long as you stay focused on the image and do not let it roll around in your head, you will begin to focus your mind. You can overcome any kind of bad mood by simply focusing. It's all a state of mind.
Meditation is the key to freeing yourself from the traps of "mood" and "attitude".