Martin Seligman wrote a book called Learned Optimism that deeply explores the issue of optimistic vs. pessimistic explanatory styles. To oversimplify, when something bad happens to a pessimist they tell themselves it is permanent, personal, and universal, whereas optimists tell themselves it is temporary, impersonal, and specific. When something good happens, the two groups do the opposite.
Here is an excerpt from the book about the unfortunate evidence that depressed people have fewer cognitive biases. Snipped/edited for length:
There is considerable evidence that depressed people, though sadder, are wiser.
Ten years ago Lauren Alloy and Lyn Abramson, then graduate students at the University of Pennsylvania, did an experiment in which people were given differing degrees of control over the lighting of a light. Some were able to control the light perfectly: It went on every time they pressed a button, and it never went on if they didn't press. The other people, however, had no control at all: The light went on regardless of whether they pressed the button.
The people in both groups were asked to judge, as accurately as they could, how much control they had. Depressed people were very accurate, both when they had control and when they didn't. The nondepressed people shocked us. They were accurate when they had control, but when helpless they were undeterred: they still judged that they had a great deal of control.
[...]
These have been consistent findings over the last decade. Depressed people -- most of whom turn out to be pessimists -- accurately judge how much control they have. Nondepressed people -- optimists, for the most part -- believe they have much more control over things than they actually do, particularly when they are helpless and have no control at all.
Another kind of evidence for the thesis that depressed people, though sadder, are wiser involves judgments of skill. Several years ago, Newsweek reported that 80 percent of American men think they are in the top half of social skills. They must have been nondepressed American men, if the results of Peter Lewinsohn, a psychologist at the University of Oregon, and his colleagues are valid. These investigators put depressed and non-depressed patients in a panel discussions and later had the patients judge how well they did. To what extent were they persuasive? Likable? As judged by a panel of observers, depressed patients weren't very persuasive or likable; poor social skills are a symptom of depression. Depressed patients judged their lack of skill accurately. The surprising finding was from the nondepressed group. They markedly overestimated their skills, judging themselves as much more persuasive and appealing than the judges thought they were.
[...]
Overall, then, there is clear evidence that nondepressed people distort reality in a self-serving direction and depressed people tend to see reality accurately. How does this evidence, which is about depression, tie into optimism and pessimism? Statistically, most depressed people score in the pessimistic range of explanatory style, and most nondepressed people score optimistically.
So basically the research is suggesting that unbiased thinkers tend to be more pessimistic and depressed than people who irrationally distort the world into being better than it actually is. What a bummer.