This post originally appeared on the iDoneThis blog.

You’re stuck in the trough of sorrow. No matter what you do, nothing in your company is improving.

You look around you, and everyone you know is crushing it. Their companies are getting acquired, they’re raising huge funding rounds, and they’re announcing new product features that people love.

But not you. You’re stuck in the trough of sorrow, and it feels like you’ll never get out. It’s emotionally trying and tough to handle psychologically, and you’ll want to quit. That’s whyfamed startup investor Paul Graham has said that the number one underlying cause of startup death is that “the [founders] become demoralized.”

How you handle those plateaus, psychologically, will determine whether you remain stalled there forever and your company ends up in the startup graveyard. You’ll face these three psychological traps — avoid them, and you’ll have a chance of making it out alive on the other side.

1. Don’t give in to despair

When you hit the trough of sorrow and realize that overnight successes actually take years and years, it’s a blow to the ego. Trust me, I know.

When you’re hungry for hits of progress, the lack of constant short-term gratification becomes a test. University of Pennsylvania psychology professor Angela Duckworth explains in The Plateau Effect that “if you’re myopic and only look at the next moment in time and you base your decisions on ‘what am I going to get out of this in the next nanosecond?’ … then when you hit a plateau, your natural conclusion is to quit and move on to the next thing.”

Don’t miss: Why I love to quit

Duckworth’s research shows it’s grit and persistence rather than talent that matters most when it comes to success. Duckworth defines grit as “perseverance and passion for long-term goals. Grit entails working strenuously toward challenges, maintaining effort and interest over years despite failure, adversity, and plateaus in progress. The gritty individual approaches achievement as a marathon; his or her advantage is stamina.”

Duckworth developed a “Grit Scale” based on a twelve-item questionnaire, which she used to measure 1,200 cadets as they started training at West Point. She discovered that grittier candidates were 60 percent more likely to last through a demanding course of training, and the Grit Scale turned out to be even more accurate than predictions based on military evaluations.

That’s why it’s absolutely vital that you don’t give in to despair. It’s too easy to give up as soon as progress isn’t coming easily. When you hit the trough, be gritty.

2. Don’t obsess

When your company hits a wall, it’s all too easy to decide that you and your team just needs to work longer and harder. You obsess more and more, and before you know it, your whole team is burned out. You’re putting in long hours, but you’re just staring at your screen and checking your email all day.

It’s strange to say, but working too hard is actually the easy way out. For entrepreneurs, it’s often easier to keep working than to take a break, even when you know you should.

If you’ve ever crammed for tests as a student, you know how easily efforts can dissipate. German psychologist Hermann Ebbinghaus knew better even back in 1885 when he identified what’s now known as the “spacing effect.” When Ebbinghaus studied lists of nonsense words to test the workings of his memory, he found that you can dramatically improve your learning ability by spacing your sessions out over time.

Yet the spacing effect is really tough to put into practice because taking pauses and stretching timelines out feels like idleness, like you’re not being productive. Why relax when you could be doing something, anything, to improve the business? It feels more logical to keep pushing yourself even though you don’t feel like you’re moving forward anymore.

This is the psychological trap that’s absolutely essential for you to avoid, where the patience and perseverance to rest comes in. Without rest, you not only risk decreased productivity, you’re increasing your vulnerability to long-term burnout.

This is why during the intensive, 3-month acceleration period of each Y Combinator class, Paul Graham instructs his startups to do only three things:

Build product Talk to customers Exercise

Don’t trick yourself into pushing too hard, no matter how tempting it might be. Space out your work, and slog through the trough of sorrow out with patience and grit.

3. Don’t become fearful

The trough may eventually become your new normal, and then you get scared of failing and falling even lower. The result is that you actually choose to plug away in mediocrity.

Improvement requires change and experimentation, moving away from the very tactics and efforts that got you at least to where you are right now. And that’s a terrifying thought when your startup is already hanging on for dear life and has very little to brag about.

This feeling of being stuck between a rock and a hard place is especially tricky to escape given our cognitive bias of “loss aversion,” where we’d rather protect ourselves against losing what we already have over acquiring gains.

For example, psychologists Daniel Kahneman and Amos Tversky found that when facing the 50/50 odds of a coin toss and a $10 loss for landing on tails, people demanded a $20 prize to accept the gamble.

“So the function for gains and losses is sort of kinked,” Kahneman explained to The New York Times. “People really discriminate sharply between gaining and losing and they don’t like losing.”

Again, continuing to push forward by doing more of the same thing looks like you’re being productive. It’s hard to see the kinked odds of loss aversion in the gamble of startups. You look like you’re working hard when you’re not working smart because you’re letting irrational fear determine your course.

According to Jeff Bezos, you have to reject that fear and go pioneering. “Failure comes part and parcel with invention,” Bezos has said, and invention and breaking new ground is what you’ll need to get out of the trough of sorrow.

Try new things, and be willing to get worse. After all, the crash of ineptitude comes right before the wiggles of false hope.

The difference between success and failure often means mastering what goes on inside of your own head.

As Justin.tv and Twitch.tv founder Justin Kan has said, “Startups don’t die, they commit suicide.” That’s why managing your startup psychology is as important as managing your product and metrics.

Take heed of these psychological traps and avoid them in your persistent, plodding march through the trough of sorrow onward to the promised land.

Read next: Why I love to quit

Read next: Skype readies a Fire Phone app that uses Dynamic Perspective for its icon and notification badge