“The future bears down upon each one of us with all the hazards of the unknown.” -- Plutarch

There is no way around it: We will experience difficulty. We will feel the touch of failure. As Benjamin Franklin observed, those who “drink to the bottom of the cup must expect to meet with some of the dregs.” Or as the 49ers coach Bill Walsh says, “Almost always, your road to victory goes through a place called ‘failure.’”

All great men and women went through difficulties to get to where they are, all of them made mistakes. They found within those experiences some benefit -- even if it was simply the realization that they were not infallible and that things would not always go their way. They found that self ­awareness was the way out and through -- if they hadn’t, they wouldn’t have gotten better and they wouldn’t have been able to rise again.

For us to follow their example and push through failure we can be sure of one thing we’ll want to avoid. Ego. Unless we use this moment as an opportunity to understand ourselves and our own mind better, ego will seek out failure like true north. Unless we learn, right here and right now, from our mistakes.

Related: Former Apple CEO John Sculley: You Learn From Your Mistakes, Not Your Successes

During times of adversity, we need to keep in mind the four principles below to help us get back up on our feet and do so without ego, which when unleashed will only make things worse.

Alive time or dead time?

According to bestselling author Robert Greene, there are two types of time in our lives: dead time, when people are passive and waiting, and alive time, when people are learning and acting and utiliz­ing every second. Every moment of failure, every moment or situation that we did not deliberately choose or control, presents this choice: Alive time. Dead time.

During times of failure the ego in all of us wants to complain about how the situation sucks. How it’s unfair. How we’d rather be doing just about anything else. And it’s this attitude that creates dead time we can never get back. In this way, ego is the mortal enemy of alive time.

It’s easy to be angry, to be aggrieved, to be depressed or heartbroken. Ego says: I don’t want this. I want ______. I want it my way. But this accomplishes nothing!

Let us say, the next time we find ourselves stuck: This is an opportunity for me. I am using it for my purposes. I will not let this be dead time for me. The dead time was when we were controlled by ego.

Alive time. Dead time. Which will it be?

Related: 10 Truths We Forget Too Easily

Focus on what you can control.

Failure and rejection can be a miserable place. How do you carry on? How do you take pride in yourself and your work?

The famous coach John Wooden’s advice to his players gives the answer: Change the definition of success. “Success is peace of mind, which is a direct result of self-­satisfaction in knowing you made the effort to do your best to become the best that you are capable of becoming.”

That’s it. Your effort, doing the best, is what you can control. This is what you need to focus on.

Do your work. Do it well. Then “let go and let God.“ That’s all there needs to be. Recognition and rewards -- ­those are just extra. Rejection, that’s on them, not on us.

In other words, the less attached we are to outcomes the better. When fulfilling our own standards is what fills us with pride and self-­respect. When the effort -- not the results, good or bad -- is enough. With ego, this is not nearly sufficient -- it wants recognition and validation.

Warren Buffett has said the same thing, making a distinction between the inner scorecard and the external one. Your potential, the absolute best you’re capable of -- that’s the metric to measure yourself against. Your own standards. Winning is not enough. People can get lucky and win. People can be assholes and win. Anyone can win. But not everyone is the best possible version of themselves.

Don’t let ego hold sway and distract you with whether or not we are getting credit and validation. It’s far better when doing good work is sufficient.

Related: 6 Steps to Writing Your Own Definition of Success

Don’t make things worse.

People make mistakes all the time. This is all perfectly fine; it’s what being an entrepreneur or a creative or even a business executive is about. We take risks. We mess up. The problem is that when we get our identity tied up in our work, we worry that any kind of failure will then say something bad about us as a person. It’s a fear of taking responsibility, of admitting that we might have messed up.

Ego asks: Why is this happening to me? How do I save this and prove to everyone I’m as great as they think? It’s the animal fear of even the slightest sign of weakness.

“Act with fortitude and honor,” Alexander Hamilton once wrote to a distraught friend in serious financial and legal trouble of the man’s own making. “If you cannot reasonably hope for a favorable extrication, do not plunge deeper. Have the courage to make a full stop.”

A full stop. It’s not that you should quit everything. It’s that a fighter who can’t tap out or a boxer who can’t recognize when it’s time to retire gets hurt. Seriously so. You have to be able to see the bigger picture. Are you going to make it worse? Or are you going to emerge from this with your dignity and character intact? Are you going to live to fight another day?

Always love.

One of ego’s worst traits is the tendency to turn a minor inconvenience or insult into a massive sore. The wound festers, becomes infected, and can borderline kill us with the hatred and anger bubbling up. Hatred is ego embodied.

In failure or adversity, it’s so easy to hate. Hate defers blame. It makes someone else responsible. It’s a distraction too; we don’t do much else when we’re busy getting revenge or investigating the wrongs that have supposedly been done to us. Does this get us any closer to where we want to be? No. It just keeps us where we are -- or worse, arrests our development entirely.

You know what is a better response to an attack or a slight or something you don’t like? Love. That’s right, love. For the neighbor who won’t turn down the music. For the parent that let you down. For the bureaucrat who lost your paperwork. For the group that rejects you. For the critic who attacks you. The former partner who stole your business idea. The bitch or the bastard who cheated on you. Love.

Related: 5 Ways Criticism and Rejection Builds Your Capacity to Succeed

We find that what defines great leaders is that instead of hating their enemies, they feel a sort of pity and empathy for them. Think of Martin Luther King Jr., over and over again, preaching that hate was a burden and love was freedom. Love was transformational, hate was debilitating. “Hate,” he said “is a cancer that gnaws away at the very vital center of your life and your existence. It is like eroding acid that eats away the best and the objective center of your life.”

Bottom line.

These are the behaviors and standards we need to embrace and commit to to be able to handle adversity. We will choose alive time and not let any moment go to waste. We will focus only on what we can control: exerting maximum effort at being our best selves. We will act with dignity and decorum and emerge with our character intact.

The difficulty that we are experiencing now? It is not a position we chose for ourselves, but we can push through with strength and purpose, not ego. In other words, we will not let ego turn a temporary failure into a permanent one. That’s a choice we can make.

This piece is adapted from Ryan Holiday’s book Ego is the Enemy, published by Penguin Portfolio.