Participants had to solve as many anagrams as possible in a limited period of time.
Depressive inpatients spent less time on unsolvable anagrams than a control group.
We controlled for group differences in the time spent on solvable anagrams.
We conclude that depression facilitates disengagement from unattainable goals.
Our findings provide evidence that depression might serve an adaptive function.