You know that the mind has a profound influence on the body.

So did Harvard Medical School researchers when they decided to study people who’d recently had heart attacks. They thought that a particular mind-set that’s known to make people feel better—feeling thankful—would predict who would be healthier six months later.

They were wrong.

Heart attack survivors who felt grateful for people and events in everyday life were just as likely to be rehospitalized within six months as those who weren’t so grateful.

But there was a positive attitude that was highly associated with better heart health six months down the line—optimism.

OPTIMISM ABOUT THE FUTURE IS POWERFUL

Harvard Medical School researchers decided to test positive attitudes on people hospitalized with a heart attack or unstable angina, so-called “acute coronary events.”

They measured both gratitude and optimism two weeks after hospitalization on 164 patients with an average age of 62. Then six months later, they investigated how physically active the patients were, whether measures of inflammation had improved, and most important, whether they had been rehospitalized. (It’s a serious concern—about one in five patients with these conditions winds up back in the hospital within a year, and many of them die within the year, too.)

The researchers expected that both optimism and gratitude, two mind-sets known to help health, would predict a better recovery. Gratitude had already been found to be healthy for the heart. Even in people in early stages of heart failure, feeling thankful is linked with better mood, better sleep, less fatigue and fewer biomarkers of inflammation, which harms the cardiovascular system. The researchers even named their project the Gratitude Research in Acute Coronary Events (GRACE) study.

But gratitude, defined as “a disposition toward appreciating and being thankful for people, events and experiences in one’s life,” tanked. While patients with the highest gratitude scores, compared with those with lower scores, did have lower measures of inflammation, other biological measures didn’t improve, they didn’t exercise more and they were just as likely to wind up in the hospital again.

But optimism, defined as “a general expectation that the future will be favorable,” was a powerful predictor. Six months in, patients who scored highest on optimism about their own future in general and their future health were less likely to be hospitalized. Indeed, for each point on the optimism scale used by the researchers, the risk of hospital readmission within six months went down 8%.

HOW OPTIMISM PROTECTS

How did optimism promote heart health? Measures of inflammation didn’t improve, but these patients were much more likely to exercise, as measured by how many steps they took in a day. Between those at the bottom on the optimism scale and those at the top, the difference was about an extra mile a day. The primary way that a positive attitude improved health, then, didn’t seem to be by directly affecting the body, but rather by motivating people to take better care of themselves—including walking more.

Why did optimism work better than gratitude? The researchers speculate that it’s because gratitude is about the present and the past, while optimism, of course, is about the future. If you feel optimism, and its cousin hope, you’re much more likely to take action to get healthier. The next question the researchers want to answer: Can heart patients learn to be more optimistic after an acute event, and would it help them recover better? That’s for a future study.

In the meantime, no one is knocking gratitude, which helps reduce stress and anxiety and improves well-being. But if you know someone who has experienced a heart emergency, good thoughts about future health may be the real balm.