From Science:
Does a good mood help when doing your job? Not always, a new study suggests. Happy thoughts can stimulate creativity, but for mundane work such as plowing through databases, being cranky or sad may work better. The study is the first to suggest that a positive frame of mind can have opposite effects on productivity depending on the nature of a task.
Stress, anxiety, and a bad mood are notorious for narrowing people’s attention and making them both think and see only what’s right in front of them; for example, a person held at gunpoint usually recalls nothing but the weapon itself. Well-being, on the other hand, is known to broaden people’s thinking and make them more creative. But whether a good mood also expands people’s attention to visual details was unknown.
More here.