In his recent Harvard commencement speech, Mark Zuckerberg explained how a couple years into his venture, some big companies wanted to buy Facebook. Everyone around him advised him to sell.

But Zuckerberg held onto his business a little longer. He felt it was destined for a higher purpose, but he was plagued by self-doubt.

"That was my hardest time leading Facebook. I believed in what we were doing, but I felt alone. And worse, it was my fault. I wondered if I was just wrong, an imposter, a 22-year-old kid who had no idea how the world worked."

You might think self-doubt is only an issue for inexperienced entrepreneurs. After all, Zuckerberg really was just a kid when he launched Facebook.

But research shows it's much more pervasive. And it "increasingly appears critical for understanding some of the surprising, ironic, and self-defeating cognitive, emotional, and behavioral findings seen in the achievement realm." All entrepreneurs experience it at some point.

Zuckerberg beat self-doubt by finding a higher purpose in his work. What else can you do?

Here are my best tips for conquering this tough challenge:

Recognize that confidence takes time.

True confidence is built on layers of success. But to succeed, you will inevitably experience failure along the way. Be patient. When you run into a problem, never view it as the end of the world. It's just another bump in the path to long-term success.

In the wise words of Bill Gates, "Success is a lousy teacher. It seduces smart people into thinking they can't lose."

At my current company, we hit problems all the time. Some of them are tiny, but some have been big enough to take down our business. At one point, we spent way too much of our budget marketing a new product line. This did some serious financial damage to the business. Instead of losing confidence in our abilities, we readjusted our strategy. And we recovered.

If anything, this challenge made my team more confident. We know that if we encounter problems, we can adjust our plans and still be successful.

Prioritize your physical well-being.

It sounds simple, right? Everyone knows you're "supposed" to eat right and get exercise. Research from as far back as 1985 suggests physical activity and exercise improve self-image and cognitive functioning, and they reduce the symptoms of anxiety.

Eating healthy is equally important. Another research study from 2015 found that eating more fruits and vegetables can enhance feelings of well-being, curiosity, and creativity.

But maintaining these habits can be hard when life gets busy. (And it always does.)

For me, I have to prioritize exercise; otherwise, it doesn't happen. I'm active 3-4 times a week through going to the gym, doing yoga, or playing sports to get my blood pumping. Like the research shows, this helps me to be more even keel in my decision making. In a startup, irrational decision making can get you into serious trouble.

Remember the big picture (your purpose).

In his speech, Zuckerberg explained how he truly believed in his company's purpose. That's what guided him when he felt lost. Even when all members of his management team left, he still held on. And it paid off -- big time. You need to remember -- and believe in -- your long-term vision.

In most startups, success comes in waves. You'll see a series of successes, then a series of failures. Stay true to your long-term purpose and work until you achieve it. At my current venture, I've had the same vision for five-plus years. This has been monumental to our success.

Remember, as Zuckerburg said, "Movies and pop culture get this all wrong. The idea of a single eureka moment is a dangerous lie. It makes us feel inadequate since we haven't had ours. It prevents people with seeds of good ideas from getting started."

Don't let self-doubt prevent you from doing big things.