Ever dealt with a really difficult situation? We’ve all had our emotional resilience tested. Sometimes it feels like you just want to give up.

How do the toughest people summon the will to keep going? Steven Southwick and Dennis Charney have studied resilient people for over 20 years. They spoke with Vietnam prisoners of war, Special Forces instructors and civilians who dealt with terrible experiences like medical problems, abuse and trauma.

In their book Resilience: The Science of Mastering Life’s Greatest Challenges they assembled the 10 things resilient people have in common so you and I can learn how to be more gritty and tough when life gets hard.

Here’s what they learned…

1) Be Optimistic

Yes, looking on the bright side keeps you going. But what’s more interesting is that they’re not talking about delusional, pollyanna-style, rose-colored glasses here.

Truly resilient people who need to survive the harshest situations and still accomplish goals (like POW’s and Special Forces units) balance a positive outlook with a realistic view of the world.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

Like pessimists, realistic optimists pay close attention to negative information that is relevant to the problems they face. However, unlike pessimists, they do not remain focused on the negative. They tend to disengage rapidly from problems that appear to be unsolvable. That is, they know when to cut their losses and turn their attention to problems that they believe they can solve.

And they’re not the only ones to realize this. When Laurence Gonzales studied survivors of life-threatening scenarios he found the same thing: they balance positivity with realism.

But that leads to an obvious question: how the heck do you do that?

Gonzales realized the distinction is in being realistic about the world but confident in your abilities: see the world accurately — but believe you are a rockstar.

(To learn how to be more optimistic, click here.)

So you’re thinking positive. But what about when your optimism gets tested and things get scary?

2) Face Your Fears

Neuroscience says there’s only one real way to deal with fear: you need to face it, head on. This is what the most resilient people do.

When we avoid scary things we become more scared. When you face your fears they become less frightening.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

To extinguish a fear-conditioned memory, one must be exposed to the fear-inducing stimulus in a safe environment, and this exposure needs to last long enough for the brain to form a new memory which conveys that the fear-conditioned stimulus is no longer dangerous in the present environment. Brain imaging findings suggest that extinction may involve a strengthening of the capacity of the PFC to inhibit amygdala-based fear responses (Phelps et al., 2004). Several approaches to treating anxiety disorders such as PTSD and phobias have been shown to be effective in promoting extinction. In essence, these therapies encourage the patient to confront the fear and anxiety head on.

What do Special Forces soldiers think when facing the most terrifying situations?

“I’m scared, but I can learn from this,” or “This is a test that’s going to make me stronger.”

From Resilience: The Science of Mastering Life’s Greatest Challenges:

In addition to viewing fear as a helpful warning and guide, medic and SF instructor Mark Hickey believes that fear is good because it keeps him on his toes and serves as a platform for developing courage, self-esteem, and a sense of mastery. When Hickey experiences fear, he often thinks, “I’m scared, but I can learn from this,” or “This is a test that’s going to make me stronger.”

(To learn how you can have more grit — from a Navy SEAL platoon commander, click here.)

Think positive. Face your fears. Good advice but what do we need to develop deep down to overcome life’s biggest obstacles?

3) Have A Moral Compass

The emotionally resilient people that Southwick and Charney studied all had a strong sense of right and wrong. Despite being in situations that could threaten their lives, they always thought about others, not just themselves.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

In our interviews, we found that many resilient individuals possessed a keen sense of right and wrong that strengthened them during periods of extreme stress and afterward, as they adjusted to life following trauma. Also altruism – selflessness, concern for the welfare of others, and giving to others with no expectation of benefit to the self – often stood as a pillar of their value system, of their “moral compass.”

They mention a program called “The Giraffe Project” that helps kids develop good values. What does the system teach? “Stick your neck out” and do the right thing.

(To learn a Stanford professor’s tips on how to make sure your kids have grit, click here.)

So morals strengthen our resolve in tough times. But where do they often come from?

4) Practice Spirituality

This was the #1 thing that one researcher found when studying people who overcame tragedy.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

Dr. Amad found religious belief among survivors to be the single most powerful force in explaining the tragedy and in explaining survival.

But what if you’re not religious? No problem.

Much of the strength from religious activity comes from being a part of a community. So you don’t have to do anything you don’t believe in, but you want to be a part of a group that strengthens your resolve.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

For example, the relationship between resilience and religion may partly be explained by the social quality of religious attendance. The word “religion” comes from the Latin “religare” meaning “to bind.” People who regularly attend religious services may have access to a deeper and broader form of social support than is often available in a secular setting.

(To learn what the survivors of deadly situations all have in common, click here.)

So being part of a group with beliefs is important. But what if you’re not?

5) Get Social Support

Even if you’re not part of a religion or community, friends and loved ones are key when life gets hard.

When Admiral Robert Shumaker was a POW in Vietnam, he was isolated from the other captives. How did he maintain his resolve?

By tapping on the wall of his cell. His fellow prisoners could hear it, and they would tap back. It’s ridiculously simple but their “tap code” let them know they were not alone in their suffering.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

During his eight years in North Vietnamese prisons, Shumaker used his wits and creativity to help develop an ingenious method of communication, known as the Tap Code, which provided a critical lifeline that allowed scores of prisoners to connect with one another.

Our brains need social support to function optimally. Connection with others releases oxytocin which calms your mind and reduces stress.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

Oxytocin’s actions in reducing amygdala activation and arousal may help to explain why positive support from others can reduce stress (Heinrichs et al., 2009; Lee et al., 2009).

And the solution isn’t just receiving help from others — it’s giving help.

As Dale Carnegie said, “You can make more friends in two months by becoming interested in other people than you can in two years by trying to get other people interested in you.”

(To learn how Special Forces soldiers overcome adversity, click here.)

But we can’t always be surrounded by others. How can people we love and respect help us thrive even when we’re alone?

More from Eric Barker:

6) Have Resilient Role Models

When you study kids who grow up in impoverished circumstances but go on to live productive, healthy lives, what do you find?

They had great role models who provided a positive example and supported them.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

One of the first psychologists to study resilience, Emmy Werner, followed the lives of children who were raised in impoverished homes with an alcoholic, abusive, or mentally ill parent. Werner observed that resilient children – the ones who grew up to be productive, emotionally healthy adults – had at least one person in their lives who truly supported them and served as an admired role model (Werner, 1993; Werner & Smith, 1992). Our research has found a similar pattern: all of the resilient individuals we interviewed have role models whose beliefs, attitudes and behaviors inspire them.

But sometimes it’s hard to find people we know we want to be like. That’s okay. Southwick and Charney found that it’s often enough to have bad role models — people who provide an example of what you don’t want to be.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

Although we generally think of role models as providing positive examples to admire and emulate, in some cases a particular person may stand out in the opposite way – embodying traits we emphatically do not want to have. We can think of such a person as a negative role model.

(To learn a Yale professor’s lazy secret to an awesome life, click here.)

Psychology’s great but resilience isn’t all in the mind. Where else can we find strength? In actual strength…

7) Maintain Physical Fitness

Again and again, Southwick and Charney saw that the most resilient people had good exercise habits that kept their bodies (as well as their minds) strong.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

Many of the resilient individuals we interviewed have a regular habit of exercise and believe that staying fit has helped them, both during their traumatic ordeals and during their recovery. In fact, some of them credit physical exercise with saving their lives.

And, interestingly, this seems to be more important if you’re someone who’s a bit more emotionally fragile. Why?

The stress of exercise helps us adapt to the stress we will feel when life challenges us.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

Researchers believe that during vigorous aerobic exercise, the “anxiety-sensitive” person is forced to tolerate many of the same symptoms (that is, rapid heart rate, sweating, and rapid breathing) that frighten him or her during periods of anxiety. Over time, the “anxiety-sensitive” individual who continues to exercise vigorously can learn that these symptoms of arousal are typically not dangerous, and the fear that these symptoms trigger gradually decreases in intensity (Salmon, 2001).

(To learn what makes Olympic athletes and Navy SEALs so mentally tough, click here.)

But getting your body in shape isn’t everything…

8) Keep Your Brain Strong

No, that little brain game on your phone isn’t what we’re talking about. Resilient people are very often lifelong learners. They keep growing their mind, learning to learn, and adapting to new information about the world.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

In our experience, resilient people tend to be lifelong learners, continually seeking opportunities to become more mentally fit.

This not only keeps you sharp but has a whole host of positive health benefits.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

Indeed, a 2004 study by Cathie Hammond at the University of London concluded that lifelong learning was associated with “…a range of health outcomes; well-being, protection and recovery from mental health difficulties, and the capacity to cope with potentially stress-inducing circumstances; … self-esteem, self-efficacy, a sense of purpose and hope, competences, and social integration. Learning developed these psychosocial qualities through extending boundaries, a process which is quintessential to learning.” (Hammond, 2004)

(To learn the four rituals neuroscience says will make you happy, click here.)

Smart and fit is good but, by definition, hard times mean things we’re not used to. How do you prepare for what you’re not prepared for?

9) Be “Cognitively Flexible”

All of us have one way we typically cope with difficulty, but what sets extremely resilient people apart is they use a number of ways to deal with stressful situations.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

People who are resilient tend to be flexible – flexible in the way they think about challenges and flexible in the way they react emotionally to stress. They are not wedded to a specific style of coping. Instead, they shift from one coping strategy to another depending on the circumstances.

What’s a good coping style that definitely works? I’ve spoken to a number of elite military operators and I’ve heard the same thing over and over… Be tough? Nope. Ignore it? Nope.

They all mentioned humor.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

Substantial evidence exists for the effectiveness of humor as a coping mechanism. Studies involving combat veterans (Hendin & Haas, 1984), cancer patients (Carver, 1993), and surgical patients (Culver et al., 2002) have found that when humor is used to reduce the threatening nature of stressful situations, it is associated with resilience and the capacity to tolerate stress (Martin, 2003).

(To learn how to be funny, click here.)

Okay, last one. What’s critical when you are dealing with the toughest situations life has to offer?

10) Find Meaning In What You Do

Resilient people don’t have jobs — they have callings. They have a mission and purpose in life that gives meaning to the things they do.

So when times are hard, they feel a greater purpose is behind them, pushing them forward.

From Resilience: The Science of Mastering Life’s Greatest Challenges:

In keeping with Frankl’s conception of service as a pillar of meaning, the ability to see one’s work as a calling may enhance resilience. This holds true even for people performing “dirty work” jobs (e.g. hospital cleaners) and for people who have been prevented from pursuing their chosen career.

(To learn how to find meaning in your life, click here.)

Alright, let’s round up what we’ve learned — and find out about the upsides of the downsides of life…

Sum Up

Here’s how to increase your emotional resilience:

Foster optimism : Don’t be in denial. See the world clearly but believe in your abilities.

: Don’t be in denial. See the world clearly but believe in your abilities. Face your fears : Hiding from fear makes it worse. Face it and you overcome it.

: Hiding from fear makes it worse. Face it and you overcome it. Have a moral compass : A strong feeling of right and wrong tells us we must when we feel we can’t.

: A strong feeling of right and wrong tells us we must when we feel we can’t. Practice spirituality : Be a part of a group that has strong beliefs.

: Be a part of a group that has strong beliefs. Give and receive social support : Tapping on the wall of your cell can keep you going.

: Tapping on the wall of your cell can keep you going. Imitate resilient role models : Or have people you know you do not want to be.

: Or have people you know you do not want to be. Physical fitness : Exercise adapts your body to stress.

: Exercise adapts your body to stress. Be a lifelong learner : Keep your brain sharp and it will give you solutions when you need them most.

: Keep your brain sharp and it will give you solutions when you need them most. Have a number of ways to cope : Be like Navy SEALs and Special Forces operators — and laugh.

: Be like Navy SEALs and Special Forces operators — and laugh. Have meaning in your life: Don’t just do a job; have a calling and a purpose.

(I’ll be sending out a PDF summary from the research in my next weekly email. To make sure you don’t miss it, join here.)

And how can the downsides of life lead to a greater upside?

We hear a lot about PTSD: post-traumatic stress disorder. But we hear a lot less about the reverse: post-traumatic growth.

And it is real. Many people who experience hardships in life and get through them don’t come out weaker, they come out better.

From Flourish: A Visionary New Understanding of Happiness and Well-being:

In a month, 1,700 people reported at least one of these awful events, and they took our well-being tests as well. To our surprise, individuals who’d experienced one awful event had more intense strengths (and therefore higher well-being) than individuals who had none. Individuals who’d been through two awful events were stronger than individuals who had one, and individuals who had three— raped, tortured, and held captive for example— were stronger than those who had two.

So it sounds like Nietzsche was right: what does not kill you really can make you stronger.

As one of the resilient people Southwick and Charney spoke to said:

I am more vulnerable than I thought, but much stronger than I ever imagined.

Join over 255,000 readers. Get a free weekly update via email here.

This piece originally appeared on Barking Up the Wrong Tree.

Sign up for Inside TIME. Be the first to see the new cover of TIME and get our most compelling stories delivered straight to your inbox. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.