People who persevere toward their goals and maintain a positive outlook on life tend to have less anxiety and depression over time, according to a new study published in the Journal of Abnormal Psychology.

“Perseverance cultivates a sense of purposefulness that can create resilience against or decrease current levels of major depressive disorder, generalized anxiety disorder and panic disorder,” said lead author Nur Hani Zainal, MS, from The Pennsylvania State University. “Looking on the bright side of unfortunate events has the same effect because people feel that life is meaningful, understandable and manageable.”

Depression, anxiety and panic disorders are common and can be chronic and debilitating, putting a person’s physical health and livelihood at risk.

“Often, people with these disorders are stuck in a cycle of negative thought patterns and behaviors that can make them feel worse,” said co-author Michelle G. Newman, PhD. “We wanted to understand what specific coping strategies would be helpful in reducing rates of depression, anxiety and panic attacks.”

The researchers looked at data from 3,294 adults (average age 45) who were followed more than 18 years. Most of the participants were white and slightly fewer than half were college-educated.

Data were collected three times, in 1995 to 1996, 2004 to 2005 and 2012 to 2013. At each interval, participants were asked to rate their goal persistence (e.g., “When I encounter problems, I don’t give up until I solve them”), self-mastery (e.g., “I can do just anything I really set my mind to”) and positive reappraisal (e.g., “I can find something positive, even in the worst situations”).

Diagnoses for major depressive, anxiety and panic disorders were also collected at each interval.

The findings show that participants who exhibited more goal persistence and optimism during the first assessment in the mid-1990s had greater reductions in depression, anxiety and panic disorders across the 18 years.

And throughout those years, those who started the study with fewer mental health problems showed more increased perseverance toward life goals and were better at focusing on the positive side of unfortunate events, said Zainal.

“Our findings suggest that people can improve their mental health by raising or maintaining high levels of tenacity, resilience and optimism,” she said. “Aspiring toward personal and career goals can make people feel like their lives have meaning. On the other hand, disengaging from striving toward those aims or having a cynical attitude can have high mental health costs.”

Unlike in previous research, the new study did not find that self-mastery, or feeling in control of one’s fate, had an effect on the mental health of participants across the 18-year period.

“This could have been because the participants, on average, did not show any changes in their use of self-mastery over time,” said Newman. “It is possible that self-mastery is a relatively stable part of a person’s character that does not easily change.”

The researchers hope their findings will be beneficial for psychotherapists working with clients dealing with depression, anxiety and panic disorders.

“Clinicians can help their clients understand the vicious cycle caused by giving up on professional and personal aspirations. Giving up may offer temporary emotional relief but can increase the risk of setbacks as regret and disappointment set in,” said Zainal.

“Boosting a patient’s optimism and resilience by committing to specific courses of actions to make dreams come to full fruition despite obstacles can generate more positive moods and a sense of purpose.”