Death is inevitable and though many are believed to fear it, a new study shows people’s thoughts actually turn to happiness when they are forced to ponder the end-of-life, according to the Association of Psychological Science.

For their study, psychologists Nathan DeWall of the University of Kentucky, and Roy Baumeister of Florida State University explored the “terror management theory,” which speculates that the brain is hard-wired to keep people from being paralyzed by fear.

Click here to see the full study (subscription required)

DeWall and Baumeister ran three experiments in a laboratory setting, during which they asked volunteers to think about what happens physically when they die and to imagine what it’s like to be dead. Once the volunteers were in this state of mind, they were given a series of word tests designed to tap into unconscious emotions.

For example, volunteers were asked to complete the word stem "jo_" to make a word. They could of made a neutral word like job or jog, or they might have instead opted for the emotional word joy. The idea is that the results represent the unconscious mind at work.

The study, published in the November issue of Psychological Science, found that when volunteers were overcome with thoughts of death, they were not depressed.

In fact, the opposite was true. The death-thinkers were much more likely than control subjects to feel positive emotional associations rather than neutral or negative ones.

DeWall and Baumeister said this suggests that the brain is involuntarily searching out and activating pleasant, positive information from the memory banks in order to help the brain cope with an incomprehensible threat.