There is no success without failure, but we tend to forget this when we are confronted with a bad grade, the reality of a poor performance or a setback in sports. How you deal with failure can make the difference in whether it inspires you do better, or give up.

A good way to raise your chances of succeeding the next time, according to a new study, is to analyze and write about your failures. People are often told to stay positive in the face of failure and not let it get them down, but failure often haunts people, making them “choke” when they have to face a similarly challenging situation again. Writing about failures, analyzing what went wrong and thinking critically about it, the study found, makes us less likely to experience the stress which can spoil performance the next time around.

Having previously written about a past failure made the body's stress response more similar to that of someone who hadn't been exposed to stress at all.

Researchers divided volunteers into two groups. One group, the test group, was asked to write about their past failures; the other, the control group, wrote about a topic not related to themselves. Then the researchers, from Rutgers University-Newark, the University of Pennsylvania and Duke University, measured the baseline levels of stress in people in both groups by checking the levels of the stress hormone, cortisol, in their saliva.

At the start of the study levels of cortisol were basically the same in both the test and control groups. Then members of both groups were exposed to a stressful task, and their cortisol levels were monitored as they confronted the challenging problem.

Not only did people who had written about their past failures have lower cortisol levels when performing the new challenge compared to the control group, they were more careful doing the new task and performed better.

“Together, these findings indicate that writing and thinking critically about a past failure can prepare an individual both physiologically and cognitively for new challenges,” said researcher, Brynne DiMenichi, a graduate student at Rutgers, in a statement. When confronted with the challenging task, people who had written about a past failure had a level of stress that was pretty much like that of someone who hadn't been exposed to stress at all.

The findings suggest that remaining positive in the face of defeat will not necessarily help you do a better job of coping with a challenging task in the future. Analyzing what went wrong and learning from failures — and doing what you can to prepare and prevent them from happening again — may be the more successful response.

The study is published in Frontiers in Behavioral Neuroscience.