A doom-and-gloom attitude may be bad for your health. A study that examined people's outlooks on life along with their cardiovascular health found those with positive attitudes tend to have the happiest hearts.

"Individuals with the highest levels of optimism have twice the odds of being in ideal cardiovascular health compared to their more pessimistic counterparts," Rosalba Hernandez, the study's lead author and a professor at the University of Illinois at Urbana-Champaign, said in a statement last week. "This association remains significant, even after adjusting for socio-demographic characteristics and poor mental health."

Heart disease kills about 2,200 Americans each day, making it the leading cause of death in the United States, according to the American Heart Association (AHA). About one in 18 Americans die from a stroke, which occurs when blood stops flowing to parts of the brain.

The Illinois study assessed more than 5,100 people between the ages of 45 and 84, the release said. Researchers used seven metrics to determine the health of each person's heart, including blood pressure, dietary intake and tobacco use. Participants also completed surveys about their mental health, levels of optimism and physical health.

The survey revealed people's overall health scores often matched their levels of optimism. 

Hernandez said the evidence suggests the AHA should include people's psychological well-being in its broader campaign to promote cardiovascular health. "At the population level, even this moderate difference in cardiovascular health translates into a significant reduction in death rates," she said in the statement.

The results support the conclusions of earlier studies on the link between mental health and physical fitness.

A July 2014 report by the AHA found higher levels of stress, hostility and depressive systems are associated with a heightened risk of stroke in middle-age and older adults, Psychology Today noted. Harvard School of Public Health similarly found in an April 2012 study positive emotions and optimism appear to reduce the risk of heart attacks and strokes.

The University of Illinois study is believed the first of its kind to examine optimism and heart health in a large, ethnically and racially diverse population, the release said. Participants were 38 percent white, 28 percent African-America, 22 percent Latino and 12 percent Chinese.