Looking on the bright side could save your life.

People who look at life from a positive perspective have a much stronger shot at avoiding death from any type of cardiovascular risk than pessimistic people, according to a new meta-analysis of nearly 300,000 people published Friday in the medical journal JAMA.

"We observed that an optimist had about a 35% lower risk of major heart complications, such as a cardiac death, stroke or a heart attack, compared to the pessimists in each of these studies," said cardiologist Dr. Alan Rozanski, a professor of medicine at the Icahn School of Medicine at Mount Sinai, who is lead author of the study.

In fact, the more positive the person, the greater the protection from heart attacks, stroke and any cause of death, said Rozanski, who is also the chief academic officer for the department of cardiology at Mount Sinai St. Luke's.

"The more pessimistic (a person was), the worse the outcome," he added.

It's not just your heart that's protected by a positive outlook. Prior research has found a direct link between optimism and other positive health attributes, such as healthier diet and exercise behaviours, a stronger immune system and better lung function, among others.

Traits of optimists

Why would that be true? Optimists tend to have better health habits, Rozanski said. They're more likely to exercise, have better diets and are less likely to smoke.

"Optimists also tend to have better coping skills and are better problem-solvers," he continued. "They are better at what we call proactive coping, or anticipating problems and then proactively taking steps to fix them."

But don't get confuse optimism with happiness, as there is a key difference.

"Happiness is an emotion. It's transient," Rozanski said. "People may have more moments of happiness than others ... but it's just a description of a feeling."

Optimism, however, is a mindset, Rozanski says.

"It's how you look at the world," he says. "Optimists are people who expect good things to happen to them, and pessimists are those who expect bad things to happen to them."

In other words, happiness may come and go but optimism is a character trait -- one that can be measured quite accurately with a series of statements called the "life orientation test."

The test includes statements such as, "I'm a believer in the idea that 'every cloud has a silver lining,'" and, "If something can go wrong for me, it will." You rate the statements on a scale from highly agree to highly disagree, and the results can be added up to determine your level of optimism or pessimism.

Learning optimism

What if you take the test and discover you're a pessimist? Don't fret. Studies show you can actually train yourself to be a positive person.

"People can change their thought patterns, but like everything else, it's a muscle that needs to be developed," Rozanski said.

Using direct measures of brain function and structure, one study found it only took 30 minutes a day of meditation practice over the course of two weeks to produce a measurable change in the brain.

"When these kinds of mental exercises are taught to people, it actually changes the function and the structure of their brain in ways that we think support these kinds of positive qualities," said neuroscientist Richard Davidson, professor of psychiatry at the University of Wisconsin-Madison and the founder and director of the Center for Healthy Minds.

One of the most effective ways to increase optimism, according to a meta-analysis of existing studies, is called the "Best Possible Self" method, where you imagine or journal about yourself in a future in which you have achieved all your life goals and all of your problems have been resolved.

Another technique is to practice gratefulness. Just taking a few minutes each day to write down what makes you thankful can improve your outlook on life. And while you're at it, list the positive experiences you had that day, which can also raise your optimism.

"And then finally, we know that cognitive behavioral therapies are very effective treatments for depression; pessimism is on the road toward depression," Rozanski said. "So you can apply the same principles as we do for depression, such as reframing. You teach there is an alternative way to think or reframe negative thoughts, and you can make great progress with a pessimist that way."