A study of white female nurses found those who were more optimistic were a third less likely to die of any cause: https://www.hsph.harvard.edu/news/press-releases/optimism-premature-death-women/
The study analyzed data from 2004–2012 from 70,000 women enrolled in the Nurses' Health Study, a long-running study tracking women’s health via surveys every two years. They looked at participants’ levels of optimism and other factors that might play a role in how optimism may affect mortality risk, such as race, high blood pressure, diet, and physical activity.
The most optimistic women (the top quartile) had a nearly 30% lower risk of dying from any of the diseases analyzed in the study compared with the least optimistic women (the bottom quartile), the study found. The most optimistic women had a 16% lower risk of dying from cancer; 38% lower risk of dying from heart disease; 39% lower risk of dying from stroke; 38% lower risk of dying from respiratory disease; and 52% lower risk of dying from infection.