Four things work for me, depending on the color and flavor of the mood:
1. Wallow in it, and even feed it with music that matches my state of mind. Be saturated with it until it exhausts itself.
2. Get completely engrossed in something, some task or project that fully occupies my mind.
3. Put myself somewhere or in some situation in which I positively cannot afford to indulge the mood. This often means doing something to take care of somebody else, but also it may mean performing in some professional capacity, such as meeting with a client.
4. Get myself some quiet time alone, preferably well away from the thousand things. If I can’t go far, even a park bench overlooking a pond or a solitary spot on a grassy hillside will do for this. Sometimes it’s just meditating in the garden, where shrubs block the house from view, or sitting by the front window and watching the rain. The main thing is to let the rushing waters come to stillness and all the sediment settle into clarity.