Failure is, despite our best efforts, an integral part of life. You can’t avoid failure, no matter how skilled you are or how lucky you seem to be, for eventually even the largest well of good fortune runs out. But what separates truly successful individuals from those who ultimately won’t make it isn’t failure; it’s a refusal to let failure block you from your goals.

But how do you not let failure stop you from achieving? Here are some ways you can deal with failure in a healthy and productive way.

FIRST, EMBRACE WHAT YOU FEEL

The first big thing to do is embrace your emotions, at least for a short while. It’s true that basking in your own defeat isn’t a recipe for success, and it can eventually cause a negative spiral of self-pity where you flounder for weeks or months.

But you do need to accept the emotions you feel upon failure, whether they be guilt, shame, sadness, frustration, or anything else. Denying your emotions isn’t healthy either; the key is in striking a balance between understanding and accepting what you feel and knowing when to cut it off.

Give yourself a little time after a devastating defeat to feel bad. Then, pick yourself back up and get started once more.

DEVELOP GOOD COPING SKILLS

Of course, this requires that you develop good emotional coping skills, preferably before you encounter a terrible failure in the first place. Emotional integrity and stability are excellent traits in any person regardless of field or position in a company.

You’ll need to figure out ways to get yourself back on track and eventually climb out of an emotional slump. This might mean treating yourself to some personal vices or indulging in some of your favorite habits for a short while. For instance, if you don’t get a job that you really wanted, it might be a good idea to treat yourself and go to a movie, or buy a sugary treat from the store.

You should also develop coping skills that are more constructive rather than placating. For example, coping with your emotions by speaking to a trusted colleague or friend or family member about them is an incredibly healthy way to work through your feelings.

For others, a regular appointment with a therapist or psychiatrist is the way to go, particularly if they have a mental illness that can make failure more draining than it otherwise would be. All in all, the goal is to get through your negative emotions to being moving forward again.

REMEMBER THAT FAILURE IS NOT ALWAYS PREVENTABLE

Another key thing to remember is that failure is not always preventable, even despite your best efforts. You can do everything right, prepare to the best of your ability, and get all your ducks in a row… And things can still fail or blow up in your face. But this isn’t an indication of weakness; instead, it’s just a fact of life.

This is all to say that failure isn’t necessarily something you should beat yourself up for. While you should always try to do your best and succeed, it’s important to recognize that failure is not a universal thing you’re in control of. In our culture, we sometimes stress that everything is the responsibility of the individual. But when it comes to failure, this simply isn’t true. Sometimes things just don’t work out.

REMOVE SOME RESPONSIBILITY FROM YOUR SHOULDERS

To that end, you’ll have to learn to forgive yourself, especially when your failures are not your fault. If you don’t get a job or your company doesn’t have a good quarter, it may be because of factors outside of your control, even if your superiors don’t recognize that.

We aren’t recommending that you shirk responsibility full-stop, especially if you’re a manager. In fact, it can help to take some responsibility for mistakes or failures if you’re a boss in any capacity, at least for the sake of the mental well-being of your employees.

But you have to learn to forgive yourself for any mistakes and not let the weight of previous failures impact your future efforts.

RECOGNIZE THAT FAILURE IS USEFUL

We’ve talked about how to deal with failure so far. How do you use it to help you achieve more goals in the future?

One of the best things you can do when you encounter failure is to analyze it and use it to improve your efforts going forward. For example, if you send out a collection of job applications and all of them get rejected, you might also get some feedback on those same applications. You can then use that feedback for future applications to new positions and do better.

Another great example might be with a company initiative. Say that your company decides to start a new membership program, but the first quarter of the effort doesn’t go as planned. Take in customer and employee feedback, understand why and how the failure came about, and use all that information to plan a better approach the next time around.

In this way, failure can actually be more useful than success. As Thomas Edison himself once said, all his failures just led him to discover 2000 ways to not make a lightbulb! In other words, he used all of his failures to create the lightbulb that eventually changed the world.

MAKE A SOLID PLAN FOR YOUR NEXT ATTEMPT

Using any information you glean from your failed efforts, you should then make a solid plan or outline for your next attempt, regardless of the actual goal. Failure can actually provide useful data points that can help you achieve even better success in the future.

All in all, don’t let failure stop you from achieving things in the future; instead, cope with your failure and then harness the information you learn from it to do even better next time. This is the key to becoming a successful professional in any field, and it’s a skill that you can benefit from throughout your entire life.