Back in 2008, things were bleak. My three-year-old startup, FireEye, was just finalizing our first viable product. We didn’t have any paying customers, couldn’t raise money and we were running out of cash. Most of my executive team and half of the engineers quit.

One night, after another one of my key execs left, I went out and rented a cheesy action movie where a guy’s whole team gets decimated, he has to fight an entire army by himself and against all odds he wins. I needed to reinforce a mental script I was writing for myself that simply said: “Despite impossible odds, victory will still be achieved!”

I replayed this script through the years it took to execute the turn around, because quitting or giving up was never an option. Today, FireEye is a public company with a market cap around $10 billion!

Most startups on the brink of failing usually will fail. But every once in a while there’s an exception like FireEye: a company that can solve a huge problem and just needs a little luck, additional effort and perseverance to break through.

Here are a couple of things you can ask yourself to determine whether your struggling startup is in this group.

Is the problem you’re solving real or imagined? You wouldn’t have started a company if you didn’t think you could improve life or solve a pain point for customers. But at some point you need hard evidence to support this view, even if customers don’t see the value you’re offering.

FireEye detects highly customized, targeted cyber attacks, the kind that traditional antivirus software, intrusion-prevention systems and firewalls can’t catch. Today, the need for this is obvious—you can hardly go a day without hearing how a major company like Neiman Marcus or Target was attacked this way. But when we were starting out, people didn’t understand the risks we face in cyber space and the inadequacy of the incumbent security architecture.

The thing that convinced me that the problem was real—and that eventually everyone else would realize this as well—was the amount of “dark matter” that was obviously on the Internet: massive amount of spam, extortion oriented denial of service attacks and the like. How else was this happening if cyber criminals didn’t have access to vast numbers of compromised computers?

My challenge was that potential customers didn’t understand the problem. In theory, I could plug a FireEye appliance into a customer’s network and find new malware. In practice, people didn’t want to listen or tested FireEye on clean, test networks, where, of course, they didn’t find anything.

We eventually got a few breaks and landed some deals. Then, in 2010, the world finally woke up to the threat posed by these cyber attacks due to a series of high profile breaches.

As a startup, you still have a chance when you aren’t getting traction for these reasons. The flip side is when prospects do understand the problem you are trying to solve, but don’t feel enough pain to buy your product even when given a full demonstration. That’s much harder to survive.

How good is your proof of concept? If you’re struggling to get paying customers you might be approaching the proof of concept wrong. One lesson I learned along the way is that this isn’t an opportunity to show that your product works, it’s an opportunity to show the potential customer how much value you provide.

I could plug a FireEye appliance into a customer’s network, spend 30 minutes configuring it and then a short while later, hand over a threat assessment report that detailed all the malware we detected that legacy security products had missed.

The two keys were 1) it didn’t take a lot of customization or configuration to set up the proof of concept, and 2) even an inexperienced sales person could explain the business impact of the report we delivered.

Without these two elements, your proof of concept won’t make the right impression and you won’t advance. This is especially true when you’re trying to evangelize a problem that people don’t know that they have. If they see you making too many configuration adjustments to the product or if you try too hard to explain the results, you won’t be able to overcome the initial skepticism.

For many companies, the proof of concept is an afterthought. In fact, this is one of the most important use cases for your product, and your ability to do a proof of concept with low friction and high impact is what ultimately drives the business engine. Getting this use case right is critical to any product that has to quickly demonstrate value to a skeptical prospect.

***

Trying to lead a struggling startup is hard. No matter how tough it gets, you need to keep calm under all circumstances. You need to do this for yourself and to keep your team motivated and persevering against all odds. Here are a couple of things I did:

Celebrate interim milestones. We didn’t have a lot of chances to ring a bell when we made a sale in the early days. So to help keep morale up, we rewarded product features that people built, product-delivery milestones and times when someone helped colleagues and contributed to team morale.

I was also tough with the team and asked that they stay focused on their jobs and disregard the engineering and executive team defections and all the other naysayers. The ones who stayed were loyal and talented, and without their determination we might have ended up quite differently.

Even though we were struggling, I kept the recruiting bar high. Yes, it was challenging to convince high-caliber people to join a struggling startup, and it would have been simpler to lower our standards. But it’s the worst possible shortcut to take, because now you have compromised your chances of break-through success. In our case, holding out culminated in hiring Dave DeWalt as our CEO.

Visualize a happy ending. Every company faces failures along the way and you need to be calm enough to deal with them. For me, the best way for me to keep my emotions in check was to mentally write a script for FireEye that had a victorious ending. Thinking this way, I never lost my cool and approached all of the problems I was enduring as mere obstacles on the road to success. And I would get to tell this story one day as a come from behind victory! I’d go over it again and again until I truly believed that it was the likely outcome.

Best of luck to all of you who are struggling to turn their business around! It can be done!