I’ll never forget the crushing loss my son’s basketball team suffered last year, at the hands of a school that seemed to be made up of gigantic, mutant, bearded sixth graders. The other guys, clearly jacked up on nuclear waste and steroids, motored up and down the court like monstrous machines, and scored almost into the triple digits, while my kiddo’s team scored…well, let’s just not even mention it. Some zeroes are better left unspoken.

I’ll never forget, either, the way my son and his teammates drooped from the gym to the parking lot afterwards—downtrodden, defeated, miserable. Failures.

It can be very hard, as a parent, to see your child fail. Part of you wants to protect your progeny from pain and disappointment. But every parent should try to remember that failure and loss can be great teachers. If we learn to handle them well and find ways to emerge stronger, we’re better people in the end.

Research out of the University of Kent’s School of Psychology strongly suggests that failure and stress can be positive, strengthening experiences for people who learn to effectively manage them. Professors Joachim Stoeber and Dirk Janssen, in a paper on their study published in the international journal Anxiety, Stress & Coping, found three main strategies exist for people who overcome failure and end up using it to their advantage.

Read Related: How to Find Resilience in Hard Times

Positive Reframing: Find the good in what happened. “We lost the game, but now I know I need to focus more on defense. Next time I’ll do better.”

Acceptance: Don’t cry over spilled milk, so to speak. “Yes, we lost, but it’s done and tomorrow is a new day.” With acceptance and reframing comes the ability to try again, which, as we will see below, is key.

Humor: If you can laugh about your failure, you’ve asserted some control over it. “Yeah, we were pretty runty, but at least we don’t go to school with stinky cavemen.”

It might seem counter-intuitive while drying the tears from your kid’s eyes after a devastating loss to think something like “this could be good for him,” but the truth of the matter is that falling down can be one of life’s greatest gifts—as long as we develop the resiliency to know how to get up again.

Throughout history many, if not most, successful and admirable people have almost always attributed their achievements not to being particularly great, but rather at having had the ability to learn from their mistakes and failures, and to keep going in spite of them. We see this played out even at the cellular level of our bodies; when we work out, we rip our muscles up. That’s why they hurt afterwards, because we’ve caused them to fail. The body seems to learn from this, and rebuilds the muscles stronger. Same goes, apparently, for our souls.

How Failure Makes Us StrongerPhysicist Albert Einstein, for instance, famously said that 99 out of 100 times, he was wrong about things—it was that 100th time that mattered in the end. Louis Pasteur said something similar: “My strength lies solely in my tenacity.”

Dale Carnegie voiced the same sentiment when he said, “Most of the important things in life have been accomplished by people who have kept trying when there seemed to be no hope at all.”

In other words, we all face disappointments and failures. All of us. Those of us who succeed, we must remind our children, are the ones who keep going anyway.

Obviously, you don’t want your kid to be a chronic loser. But it is important that we teach our kids that loss is part of life, and that often it is a stepping stone toward self improvement and even greatness, with the old adage (made new again by Kelly Clarkson) “What doesn’t kill you makes you stronger.”

My son used to want to give up and hate himself when he failed, but we’ve been beating the drum of resilience in our family since he was born. It isn’t failure that stops you, I constantly tell him, but giving up in the face of it.

I was heartened to see the wisdom of these words finally sinking in at a recent track meet. My son was in the mile race, his first ever. The gun went off, and the herd of kids started down the track. About fifteen feet in, my kid was knocked to the ground by another child who cut him off. My son badly skinned both knees and elbows. I ran to the sidelines and told him it was okay if he wanted to quit. His knees were literally dripping blood down his shins, and he had a mile yet to go and was far behind.

“I don’t quit,” he told me, and I watched, astonished, as my eleven-year-old boy completed four long laps in excruciating agony. He came in dead last, but he was the only child to raise the crowd to its feet as he crossed the finish line. The other parents and students roared as he staggered across, pain evident in every muscle of his face. They cheered him on because they knew what every single one of us has to learn, sooner or later—it’s not losing that makes us losers; it’s giving up. It is possible to lose, but still be a winner. My son proved it that day.