People who have an optimistic outlook on life tend to be happier, recover better from disability, and live longer, according to a new study on people with heart disease.

The study focused on more than 600 patients in Denmark who had ischemic heart disease, commonly known as coronary artery disease, which usually occurs when arteries leading to the heart become narrow, restricting blood flow, and ultimately leading to a heart attack.

For the study, participants answered questionnaires that measured their moods. They then met again with researchers five years later for a follow-up. Researchers found that those who were most optimistic exercised more as well, and had 42 percent lower chance of dying for any reason during the five year period. These participants also showed lower rates of heart-related hospitalizations. Less than 10 percent participants in the optimistic group died, compared to 16.5 percent of less optimistic participants.

About 600,000 Americans die each year as a result of heart disease, according to the Centers for Disease Control and Prevention (CDC). On top of that, ischemic heart disease is the most common form of heart disease, killing more than 385,000 people each year.

Maintaining an optimistic outlook isn’t as difficult as it may seem either. Simply committing to thinking more positively can lead to an upward spiral, in which positive feelings are built upon each other, according to a recent study, in which participants were asked to think positively toward themselves and others for six weeks. Conversely, being stressed increases a person's risk for heart disease.

Likening mood and exercise to the chicken-and-egg relationship, study author Dr. Susanne Pedersen says that each factor influences the other. “We should focus not only on increasing positive attitude in cardiac rehabilitation, but also make sure that patients perform exercise on a regular basis, as exercise is associated with both increased levels of optimism and better health,” she said in a statement.

Source: Hoogwegt M, Pedersen S, Zwisler A, et al. Exercise Mediates the Association Between Positive Affect and 5-Year Mortality in Patients With Ischemic Heart Disease. Circulation: Cardiovascular Quality and Outcomes. 2013.