A few things help me:
- Tomorrow will be another day. No matter how bad things are today, you'll wake up tomorrow and can start fresh.
- Support. I'm grateful that my wife is very supportive and always seems to say the right thing whenever I have doubts. If you don't have a wife, a close friend who also is a founder helps too. Failing that, I'm also in some private, paid forums with similar people. That helps as well.
- Understand that progress will never be as fast as you want. Keep things in perspective. When I launched my SaaS app on Show HN, I managed to get 3 signups. It may be peanuts for some people but for me it was really exciting. It showed progress and gave me encouragement to continue. Don't compare yourself to others but to your past self. Are you further along that you were a week/month ago? If yes, that's a good sign. If no, it could mean that this startup might not be feasible but it could also mean that you're not putting in the effort or you're putting it into the wrong place.
- Ask yourself "Am I enjoying this?" Even with the ups and downs I go through, I've been asking myself "Am I enjoying this?" and the answer is Yes.
That is why you go on. Stopping would be ...unbearable.
Any capitalist will profit from backing you through thick & thin.
So much so that you need to choose your capitalist as carefully as they would choose you, or even more so.
All the best.