Setbacks are a part of life. The founder of Heinz was a failed horseradish salesman. Even Steve Jobs was fired once -- and that was from Apple, a company he founded.

Despite great intentions, long nights, big risks and hard work, failure is always a possibility. In fact, half of all new companies with employees won’t survive after five years, according to the Small Business Administration.

Related: 8 Ways Intelligent People Use Failure to Their Advantage

Those facts can be cold comfort. Watching something you built fall apart despite your best efforts can be both infuriating and demoralizing. Worse, it can be paralyzing, as you begin to doubt your own abilities.

But before you’re lost in a negative feedback loop, remember it’s possible to bounce back from failure and become stronger than ever.

Read on for tips from scientists and entrepreneurs about how to emerge from failure and rejection of any type -- and with your confidence intact.

1. Wallow

Pep Karsten | Getty Images

Yes, wallow. Allow yourself to feel everything you need to feel. With the loss you’re mourning an identity and future you’d envisioned. Grieving, and yearning for what was lost, can help ease the suffering.

Entrepreneur

2. But dont wallow too long

Marga Frontera | Getty Images

Real estate mogul Barbara Corcoran is best known for her straight talk on the hit series Shark Tank. But she almost wasn’t on the show. She was initially passed over -- and for a woman half her age.

When it happened, she shame-spiraled at first -- but then got mad. In an e-mail to show creator Mark Burnett, Corcoran explained what the show would miss out on without her and asked to compete for the spot. She added, “I consider your rejection a lucky charm, because everything that ever happened in my life came on the heels of failure.”

Related: You Tried and You Failed. Here's How to Rebound

The show reconsidered a success Corcoran attributes to her own resilience. “The difference between the real winners is how long they take to feel sorry for themselves. My winners...say ‘hit me again.’”

When wallowing, how long is too long? Some entrepreneurs suggest setting a move-on date. After losing at the 2006 Olympics, Jeremy Bloom gave himself 48 hours to be completely alone and play and replay what had just happened in his head. But after that two-day period, he moved on. This commitment to the future, says Bloom, is critical to weathering adversity.

3. Be honest

Portra Images | Getty Images

In a clear-eyed way, map out how things transpired the way they did. Think about what went wrong and why. “Don't rationalize it away,” says Marcus.

If need be, call on a mentor or a friend with an outside perspective to keep you accountable, suggests Marcus. “The people to whom you want to relate are those whom you want to show that you can fail, learn from failure, and keep going,”

personal finance platform Nerdwallet has a “fail wall” in its office

4. Forgive yourself

Esthermm | Getty Images

Six years ago, the unthinkable happened to business coach Gene Hammett. His business completely fell apart under the weight of a bad deal beyond his control. Soon income stopped coming in and he needed to navigate costly and stressful legal issues. He needed to move forward. But before he could do that, he had to take ownership of what happened and forgive himself for it.

Related: I Lost $3 Million In One Day. My Business Was Gone. But These Are the Steps I Had to Take First to Bounce Back.

He watched his friends approached their own challenges and slowly learned how forgiveness could lead to resilience. Even though his problems were his own, he realized he was not alone. “I was able to let go of the pain and accept responsibility for what happened. Forgiving myself was the most powerful lesson I learned in this journey.”

5. Find what makes you happy

vgajic | Getty Images

Do you have a hobby you love or places that bring you joy? Embrace that. During hard times, positive thoughts can ward off depressive tailspins. Called the ‘undo effect,’ this positivity is key to fueling persistence, according to Barbara Fredrickson, a professor of psychology at the University of North Carolina, Chapel Hill.

Negative emotions can hijack the recovery process, feeding fear and stress and making it difficult to think creatively or find broad solutions. Positive emotions, on the other hand, can expand your horizons. "When people are able to self-generate a positive emotion or perspective, that enables them to bounce back. It's not just that you bounce back and then you feel good -- feeling good drives the process."

6. Count your blessings

Jon Asato/EyeEm | Getty Images

It’s not all bad, is it? Sometimes we can all use a reminder. Which is why entrepreneur and business strategist Matt Mayberry recommends that every day, no matter what, writes down what he’s most grateful for. The list works as a practical tool: if he faces a setback, he can quickly access a stack of lists to prove how much is still going right in his life.

Scientists have found that listing blessings might also have a direct connection to feeling good. The Greater Good Science Center, an initiative from the University of California-Berkeley, created an online journal to promote gratitude. Through surveys related to the project, researchers found that those who posted more to the gratitude journals on a particular day rated that day more positive overall.

And those who were thankful for people and not things were 150 percent more likely to say “This made my whole day glorious” when the study asked them to rate how that entry impacted them. The project is still online, for those who want to create their own confidential gratitude journal on the platform.

7. Meditate

Kostyazar | Getty Images

Music mogul Russell Simmons swears by meditation and suggests carving out 40 minutes a day for quiet, steady thought. He says that it clears his mind of distractions and helps him better channel his creativity. He says it also helps him cope with the highs and the inevitable lows of business. Says Simmons, Entrepreneurs pop Champagne and celebrate when an idea has "won," but become dark and depressed when an idea has "lost." He reminds us that neither reaction is sustainable and what’s important is to focus on the work itself. “You’ll be happier and do a much better job.”

Related: Russell Simmons: 3 Simple Ways Meditation Will Make You a Better Entrepreneur

8. Help someone

Sam Edwards | Getty Images

In the wake of a failure, look for ways you can be helpful. John Brubaker worked as a university Lacrosse coach in the late ‘90s, but hit a rut. It seemed the harder he worked to win games, the more his team lost. His mentor suggested reframing his thinking to helping, not winning. With this approach, he shifted his focus to helping each player reach his potential and to discuss winning as little as possible. He says the more he helped his team, the more games they won.

Related: This Four-Letter Word Can Change Your Perspective and Lead You to Win

Later, Brubaker entered sales. He struggled at first, but his coach again reminded him again to think about helping, not selling. The shift reframed something which he said could seem just selfish to something constructive and altruistic -- helping to build people’s businesses. When the thinking changed, the sales followed. “When you focus on the process of helping others,” says Brubaker, “the outcomes you were previously seeking take care of themselves.”

9. Look for the opportunity

Tom Merton | Getty Images

Setbacks are stressful, there’s no doubt about it. But in those trying times, there are ways to cope. Each of us has a stress tolerance, the optimal level of stress that can make work engaging and interesting. However, once we step beyond that tolerance, we begin to make poor decisions and even health problems.

Related: How to Raise Your Stress Tolerance

To manage, think about what opportunities the stressor you’re facing creates, says David Ballard, a psychologist and head of the American Psychological Association's Center for Organizational Excellence. Perhaps the cloud you’re under has a silver lining, such as saved time or money that be used for something else.

Finding that opportunity will help you move forward faster. "People who have trouble bouncing back often see that challenge as completely insurmountable," according to Ballard.

10. Forget about winning

Caiaimage/Paul Bradbury | Getty Images

Jeremy Bloom, who is now the CEO of software firm Integrate, knows a thing or two about winning. Before getting into business, he was an NFL player and an Olympic skier. But he also knows loss. Though a World Cup Winner, he’d finished off-podium at two Olympics. A number of strategies helped him move forward, including taking the need to win out of the equation.

Bloom was introduced to the idea by the book The Power of Intention by Wayne Dyer. After so many years of competition, Bloom said the idea of not playing to win initially made him feel naked. But kept with the approach, even helping former rivals, and the experience was liberating. He even began to win again, and the next year snagged more World Cup Medals than anyone yet in the competition’s history.

More importantly, said Bloom, the approach helped him prioritize, a key reminder for any entrepreneurs. The approach, “could give you the peace of mind to focus on the important things like product delivery and customer success”

11. Think big

Deux | Getty Images

Through visualizing success, some studies have shown that you can ‘trick’ your brain into helping you to make something possible. One study of 30 people worked with participants over 12 weeks to strengthen pinky muscles.

Some used physical training while others focused on mentally visualizing a stronger pinky. While the physical training was the most effective, increasing strength by 53 percent, the mental training increased strength by 35 percent.

The researchers said it’s possible that mental training can enhance certain signals in your brain, driving a higher muscle activation level. So, the next time you’re working toward something, it might be worth visualizing that process to success in order to speed your way to it.

Related: 4 Ways to Rebuild Your Self-Confidence After a Setback

12. Think small

Steven Errico | Getty Images

While there’s virtue in persistence, there’s also the chance for folly. One more chance can turn into three or five, and eventually you've exhausted valuable resources you could use for other projects. In his book Adapt: Why Success Always Starts with Failure, economist Tim Harford advises against doubling down and making riskier bets than you might have otherwise.

13. Remind yourself: This will pass

Caiaimage/Trevor Adeline | Getty Images

Setbacks can feel personal. They have a way of convincing you that you don’t have the business acumen or overall intelligence you need and never will. To cope, don’t personalize the loss and remind yourself that things will change -- and that you can help make those changes possible.

A study conducted by Stanford psychologist Carol Dweck and doctoral student Lauren Howe, looked into the how different people face rejection, wanting to learn more about the reactions from those with fixed mindsets (people who assume their traits don’t change) and growth mindsets (people who believe personalities are malleable).

Those with growth mindsets didn’t see a setback as a reflection on their worth, but as a way to improve. For these people, the rejection was less likely to carry into the future. Those with fixed mindsets, on the other hand, internalized the rejection, felt it proved something was wrong with them and felt shame and embarrassment.

The key takeaway? Failure isn't a black mark on some sort of metaphysical permanent record. The more you know you can change your lot, the more resilient you can be.

14. Listen to your feelings

Natalie Faye | Getty Images

Negative emotions don’t have to lead to negative outcomes. Some experts remind us that emotions such as guilt, anxiety, envy and anger can be cues to “protect ourselves from bad behavior, either our own or someone else’s.”

Isolate what you’re feeling. One clinical psychologist suggests you breathe deeply to determine if your heart is racing (which might mean you’re anxious) or if there’s a weight in your chest (which might point to sadness). Then consider what caused the feeling and what you can do about it, and the pros and cons of that action. Listening to what you ‘should’ do in these situations, and turning hurt feelings into a type of motivation can help spur you to constructive action.

15. Forget perfect. Be consistent.

Klaus Vedfelt | Getty Images

When you’re ready to get back onto the horse and try again, don’t do it haphazardly. Come up with a consistent, realistic game plan for networking, reaching out to vendors, engaging with investors and more. Daily work toward your goal is key to building momentum, according to author and behavior science expert James Clear.

“Daily failures are like red lights during a road trip. When you're driving a car, you'll come to a red light every now and then. But if you maintain a good average speed, you'll always make it to your destination despite the stops and delays along the way.” Making working toward your goal a habit will lessen the impact of individual setbacks.

Related: Being Consistent Is Not the Same as Being Perfect

16. Don't isolate yourself

Deux | Getty Images

17. Don't be afraid to try again

FluxFactory | Getty Images

18. Remind yourself of your triumphs

artland | Getty Images

Even though you are likely to be pretty consumed with this setback right now, it's important to recall the successes that you have achieved. So be kind to yourself, and remember that you have been resilient and resourceful before, and you will be again.