Sure, it’s exhilarating to be your own boss and take an idea from a passion project to a real business, but sometimes, there are rough days that can weaken your resolve. Maybe the client who seemed great when you first met has turned into Attila the Hun. The investor you thought was really interested in making a deal is suddenly blowing you off. Or that great new employee has ghosted.

So how do you stay strong and keep the faith? Here are some battle-tested ways to steel yourself against the ups and downs.

Put a new spin on the gratitude journal.

Take time once a day to jot down at least one thing you love about running your business—the favorite clients, the amazing victories, the places it takes you. As the ideas start flowing, you’ll probably find it hard to choose just one, not matter how tough a day you’ve had. Taking stock of the good things your business has brought you can be a great way to get your eyes back on the prize.

Train your brain.

If you’re not taking any time each week to practice a discipline that encourages mindfulness, put it on your schedule. Whether you fire up Headspace every morning and meditate for 10 minutes, take a yoga class or listen to classical music, any discipline that helps you to train your mind to be less reactive to the situations going on around you will help you in business. Mindfulness will give you the perspective you need to weather the inevitable ups and downs.

Work out regularly.

There’s no better way to release pent up stress than through a physical activity you love. Whether it’s power walking, CrossFit, running, cycling, rowing or a trendy new fitness class, finding a way to release pent up energy is great way to push the re-set button in your life. Ideally, pick an activity that’s so vigorous you can’t think about the office when you’re doing it. By stepping away from your desk and taking care of your body, you’ll have the stamina you need to weather whatever happens at your business.

Hit the library.

Check out a book on your favorite great entrepreneur. Steve Jobs, Elon Musk, Phil Knight and other famous names achieved great things despite many setbacks. So can you—as long as you don’t give up.

Make time for friends who have nothing to do with your business.

There’s a big world outside of your office, but it’s easy to forget that. Spending time with your pals and finding out what’s going on for them is a great distraction from anything that’s getting you down at work. Plan something fun, whether it’s an early morning hike, the latest action movie or a night at a comedy club. And make a resolution to talk about something other than your business, so you can clear your mind for one evening.

Turn to a trusted mentor.

Sometimes, if a business problem is really serious and you’re in over your head, distracting yourself from it isn’t the best idea. When times get really tough, reach out to a trusted mentor (or two) early. Your mentor may have weathered something similar and may be able to give you really good advice or help you make a connection who can help you. There are few problems in business that are so unique that no one has ever experienced them before.

Don’t have a mentor? Get some free advice at your local Small Business Development Center, run by the U.S. Small Business Administration, or reach out to SCORE, where you can get advice from seasoned business executives. Why struggle alone when there are many people out there who can help you?

Seek community.

Being around other entrepreneurs can be a great antidote to the alienation and isolation that can set in when you’re experiencing a low moment in your business. Try attending a tech or entrepreneurship Meetup you’ve never been to before. Simply being in a room full of entrepreneurial energy may be just what you need to push re-set on your mindset and start tomorrow with a fresh outlook.