The song “Don’t worry be happy” may mean more for your heart health than musician Bobby McFerrin probably ever realized.

New research published Tuesday in the American Heart Association journal Circulation: Cardiovascular Quality and Outcomes suggests that people with heart disease are more likely to exercise — and therefore live longer — if they have a positive attitude.

The study, which assessed the moods of 600 ischemic heart disease patients in a Denmark hospital for five years, showed that less than 10 percent of the patients who were considered most positive died from coronary artery disease, compared to 16.5 percent for those with less positive attitudes.

Tuesday’s results reinforce other studies which have shown a link between optimism and health, said study co-author Susanne S. Pedersen, Ph.D., professor of cardiac psychology at the Tilburg University, the Netherlands and adjunct professor of cardiac psychology at the University of Southern Denmark and Odense University Hospital, Denmark.

“We should focus not only on increasing positive attitude in cardiac rehabilitation,” she said. “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.”