We all know failure is part of being an entrepreneur. It happens. It's a part of life. And, yes, we learn from it. Lots of people will tell you all the great benefits we get from understanding our failures.

But, failure isn't fun. And the best advice isn't how to learn from failure, but how to avoid it in the first place. Why fail when you can succeed? Success actually teaches us just as much as failure, and it makes us more money and gives our businesses a better footing. 

The next time you feel like you could be staring failure in the face, don’t throw in the towel and let it happen, thinking it's time to learn failure's valuable lessons. Instead, do the following and put yourself in a position to learn from your wins rather than losses:

Breathe. If you feel like you could be heading for failure, it’s possible that you’ve been running at full speed for a while and it’s time to take a step back and take a deep breath. Seriously. Truth is, running as fast as you can away from failure will only ensure it arrives. Instead, slow down for a minute, take a step back, and believe that everything will work out one way or another. Unless you give yourself a few minutes to breathe and regroup, failure is inevitable.

Be willing to change course. Einstein insisted that insanity is doing the same thing over and over and expecting different results. So if you’ve been on the same course, doing your job the same way for some time but you keep hitting a virtual wall, then perhaps you really are insane. If your current approach isn’t working, perhaps it’s time to admit it and find a new approach. There’s no shame in failing, except if that failure was caused by pigheadedness or an unwillingness to change. True leaders don’t have all the answers. The difference between leaders and everyone else is that leaders accept that they don’t know everything or have all the answers and they are willing to make necessary changes. Others are always trying to prove that they are always right and will convince themselves that their way is the only way.

Related: Women, Are We to Blame for the Glass Ceiling?

Seek advice. Whether you believe it or not, you don’t have all the answers to every problem. Soliciting help from someone who’s been there, done that can be invaluable to you and your business. Mentors don’t always have all the answers either, but you can learn from their experience and knowledge and use them to figure out your own best course of action. Sometimes just talking with someone who can perhaps partner with you in problem-solving can be just the thing you need to find solutions to your organization’s challenges. Another option is to hire a business or executive coach. Coaching is a powerful discipline that can allow you to come up with the answers yourself. Coaches do not consult or give advice. But they can be a great resource for stimulating your creativity, challenging your current way of thinking and promote your ability to be innovative.

Solicit feedback. I don’t care if you're the boss. You’re also a person. You put your pants on one leg at a time like everybody else and you also make mistakes and have blinders about your performance. While perhaps soliciting feedback from every employee is not practical, enrolling a cross-section of employees up and down the corporate ladder, including both employees who you like and those you don't, can give you a perspective on your performance that you might not otherwise be able to see. Perhaps you can hire an outside consultant to conduct your firm’s 360-degree-review process so you, too, can participate (rather than hosting) to obtain honest feedback. Employees generally won’t be honest with you to your face even if you beg them and promise that what they say won’t affect their careers, but obtaining that intelligence can be just what you need to get out of your own way.

Related: The One Tool You Need For Success? A Mirror.

Face the worst-case scenario. For many—myself included—failure is never an option. But when faced with failure most people feel a sense of panic. It feels awful but there is something you can do to calm your nerves.  When your mind is racing or thinking about how bad things are or can get, slow it down by really considering the worst-case scenario. Sit quietly for a few minutes and think (or write down) what you fear happening the most. Really connect with that and face your fear. You will be surprised how once you know what you could be facing, it becomes easier to deal with it head-on rather than letting that fear paralyze you.

Have some faith. I am not at all a religious person in the traditional sense of the word. However, I do have tons of faith that there is something bigger in the universe besides our flesh and bone that connects all souls in the universe. Call it the universe or G-d or anything else that resonates with you. The point is, there is more to life on earth than what we see and the sooner we apply our faith to our careers the sooner it won’t seem so scary, frustrating or hopeless. For me, I believe that everything works out the way it’s supposed to. That faith makes me let go a little and allow some cards to fall where they may. That doesn't mean you shouldn’t take action and do everything you can to ensure your success, but a little faith mixed with action can go a long way.

Have an exit strategy. Entrepreneurs know better than anyone that having an exit strategy is a required component of their business plans, especially if they are seeking outside investor funding. The exit strategy is in part, the “what do I do next if I do fail” plan. In truth, every person who works should have an exit strategy. If you work for yourself then you probably already have one. If you work for someone else, chances are you don’t. For entrepreneurs, perhaps that’s to sell the company to a competitor or a private equity firm. For employees, perhaps that’s to go to work for a competitor or to take your services on the road and start your own firm. The point is, there’s no reason to feel stuck because there are always options. 

Related: The 7 Things You Should Never Say to Your Employees