Whether you’re trying to get out of debt, obtain a college degree, build a start-up company, or stick to a healthier diet, many of life’s most meaningful goals require a great deal of perseverance. Have you ever tried to tackle a difficult long-term goal and failed? If so, you might think that only certain people have what it takes to successfully achieve their dreams.

You’d be wrong.

In reality, accomplishing what you want usually comes down to one thing: the art of perseverance. It’s not an inherent character trait, so don’t tell yourself “Oh well, I guess I’m not one of those people who can do _________.”

Perseverance can be learned. In fact, you’re going to start learning it right now. But first, concentrate for a moment on whatever _________ is for you. Is it learning a second language? Running a mile in under 6 minutes? Writing a screenplay? Or paying off all your credit cards? Whatever it is, think about it as you read the rest of this article.

Below, we’ll walk through 7 steps that will make you a master of the art of perseverance:

Gain Inspiration from Famous Failures

To persevere and reach your goals, you will need to maintain an incredibly strong BELIEF in your ability to succeed, even in the face of (temporary) failure. One of the best ways to bolster this sense of optimism is to internalize the stories of people who have made the leap from failure to overwhelming success.

For example, in 1978, a man who had two university degrees but very few post-graduate accomplishments decided to run for Congress. After a grueling campaign, he gathered friends, family, and supporters to watch the results of the election, only to quickly realize that he had lost by 6 percentage points. It would have been easy for him to say, “Oh well, I guess I’m not one of those people who can win an election” — and simply go on with his life.

Similarly, in 2000, another man watched as election results confirmed that he had failed to win a Congressional election. He lost to the incumbent by a margin of more than 2 to 1. He, too, could have easily said, “Oh well, I guess I’m not one of those people who can win an election.”

Instead, on January 20th, 2008, the first man shook hands with the second man as he passed the Presidency of the United States over to him. Their names, of course, are George Bush and Barack Obama.

It turned out they could both win an election after all.

There are literally thousands of stories like this, many of them less well-known but even more inspiring. (For a couple more, check out Chris Sacca and J.K. Rowling)

So what’s the lesson here? Draw strength from other people’s triumphs over failure, even if you don’t know them and will never meet them. Failure, more than almost anything in life, can feel painfully lonely. To fight the loneliness, find your favorite inspirational biographies and use them to remind yourself that when you fail it doesn’t have to be the end of your story — it might just be the turning point where you decided not to give up and in doing so set the foundation for your future success.

Who knows, someday a person you’ve never even met could be getting inspiration from your perseverance in the face of failure.

Write Your Own Script to Combat Uncertainty

Sometimes we forget how powerful the human mind is. Believe it or not, you can increase the likelihood that you will do something simply by first seeing it happen in your mind.

Have you ever heard of Michael Jordan’s visualization ritual? Before every game, he would preview the game in his mind and see himself doing all the things that he wanted to accomplish during the game. By the time the game actually started, he would be able to act out the ‘script’ he had written in his own mind.

He wasn’t surprised when he blocked an opponent’s shot or broke away from his defender for a crowd-pleasing slam dunk. To him, that was the expected outcome. Jordan once described his mindset during games like this:

“I tend to be calm. Things tend to slow down. As I go into situations [where] people don’t know the outcome, I’ve already experienced them in my mind… So it didn’t seem new to me and I wasn’t afraid to fail.”

Despite his incredible natural talent and all his hard work, he needed a little something more to reach the level of success that he was capable of. Discovering the power of visualization was a key to achieving his dreams. “Once I began to understand that,” he said, “I became a master of the game of basketball.”

You can use this same technique to help you “be like Mike” in accomplishing your goals.

All it takes is for you to visualize the specific steps that will get you to your destination. If your goal is to get a job in a particular industry, start to visualize yourself going to networking events, calling potential employers, preparing for interviews, and receiving job offers. Visualize these things in as much detail as possible.

You’ll be writing a script so that once these things start happening you won’t even be surprised because after all, it’s what you expected.

Focus on Short-Term Victories

One of the things that can paralyze you and impede your progress toward achieving your goal is to focus only on the big picture. If you do that, it will seem like you’re not getting anywhere because your goal is inherently a long-term goal (remember, we’re talking about perseverance for a reason).

If you hired a construction team to build you a new house, and then you judged their success based on how the house looked after the first week, you’d be pretty disappointed. The ‘house’ wouldn’t look like much at that point because it would mostly just be a foundation. But of course the foundation would eventually make the rest of the house possible. By the same token, it would be silly to judge your short-term progress based on long-term measurements.

Certainly, your long-term goal is what ultimately matters, but you need short-term victories to keep you motivated and to gradually move you forward. So learn to congratulate yourself for laying the foundation for your success (sometimes on a daily basis).

For example, if your goal is to run a 6-minute mile, it’s possible that on the first day of your training you might barely make it all the way around the track. Rather than look at it as evidence of how far you are from your big goal (i.e. “Darn, I can’t believe I barely made it around the track”) — which would sap your enthusiasm — you should see it as the first mini-goal that you’ve completed (i.e. “Wow, I can’t believe I made it all the way around the track on the first day!”).

Your enthusiasm is necessary to keep you moving forward, and focusing on your successful completion of each small step will eventually carry you to your goal.

Banish Negative Thoughts

This is a pretty simple point, but it’s one that will make all the difference. Your odds of achieving your goal, no matter how difficult, are always between 0 and 100 percent. If you succumb to negative thoughts such as, “I can’t do this,” “I’m not good at this,” or “I’ll never be as good as that person,” you will sabotage your own efforts and eventually give up. Which means you’ll have a 0 percent chance of achieving your goal.

Instead — and you can start this right now — vow to make your mind a “No Negative Zone.” From this moment forward, you’ll begin forming a habit of banishing negative thoughts from your mind. You can picture them as little flies or mosquitoes that have come to distract you, and with your mental muscles you simply flick them away.

You’ll be surprised at how easy it can be, once you get in the habit of identifying and chasing away those negative thoughts, to stay focused on the positive and maintain your conviction that you WILL accomplish your goal.

Be Ready for Your Mistakes to Make You Smarter

Along the way, there will be times when you’ll make mistakes. If you’re going to persevere through them, you’ll need to prepare your mindset to accept them ahead of time. After all, mistakes are an inevitable part of your journey toward your goal.

In fact, you can even turn your mistakes into victories of learning. Be unashamedly proud of your mistakes and tell your friends about them and laugh together.

For example, let’s say you get your first interview for a job right out of college. You go to the interview and within minutes you’ve forgotten what you wanted to say and are stumbling over your words. This could be an unpleasant experience, to say the least.

However, if you’ve prepared yourself in advance to view each mistake as a learning opportunity, then you’ll be able to call up a friend and share the gory details (“I told the CEO that my favorite TV show is SpongeBob SquarePants!”), after which you’ll be able to re-focus and start examining the experience to figure out how you can make the next interview go more smoothly.

This way, you won’t be too hard on yourself when you make mistakes and get down on yourself to the point that you lose your motivation to keep striving. Having a constructive and forgiving attitude toward mistakes will help you heal faster and will allow you to use the experience to re-focus and refine your approach.

Let the Haters Fuel Your Desire

As you work toward your goal, you might run into people who subtly or explicitly question your ability to succeed. These are the “haters.”

Who knows why they choose to spend their energy criticizing or doubting you. Maybe they’re jealous, maybe they’re mean-spirited, or maybe they don’t have anything better to do. Whatever the case, it doesn’t matter. Because what you’ll need to do is to avoid engaging with them as much as possible. Any energy you spend on them will be wasted, so simply brush that dirt off your shoulder and use their hate to fuel your desire.

Often times, when people tell you that you can’t do something, it strengthens your resolve to go out and do it.

March to the Beat of Your Favorite Tune

Music has amazing power to shape our emotions and therefore our actions. If you discount its impact, you will miss out on a tool that has helped generations of people overcome the toughest of challenges and persevere in spite of real danger.

It’s no coincidence that the song “We Shall Overcome” became an anthem of the Civil Rights Movement, one of the ultimate triumphs of perseverance over adversity. Music can unite people and help them believe in something even when all hope seems lost.

Use that power to help you on your own journey. Remember that the tone, tempo, and lyrics of whatever song you’re listening to will influence your mood, so pick one that embodies the emotion you want to have.

There’s no shortage of inspiring music — find your favorite songs that make you feel upbeat and confident, and listen to them when your dedication is flagging or when you’re in need of an emotional or spiritual pick-me-up.

And that’s the final step. So remember…

Whatever your goal is, you will do it. Good luck!