If you learnt even one thing from the effort, then it was worth it. Not every endeavor will bring you financial rewards, at least not directly. If you took on the effort because you loved the idea, rewards will flow via other means.
It's easy after-the-fact to see that, but it's hard to know when it's happening. Possibly the most celebrated entrepreneur is Elon Musk, and I don't think there's any question he put his company before his personal life multiple times in order to succeed. But how many other people have done that and then failed? It can leave you as a shell of your former self.
Everybody talks about the upside. Nobody wants to talk about the downside.
But this is the point of life! The experience.
Now I'm onto something else.
There has to be this drive to do something different, something that you love and that will make a difference. Sometimes it takes more than one try to find that one thing.
It's the modern form of a luta continua, vitória é certa. How else would you succeed if you don't try, and fail, and fail...
That, or stick with your day job, even if it bores you to death.
This ignores the mental toll that exhausting yourself on a company takes though. There are lots of people that start companies, but many people quit when the going gets tough. Those that commit everything to it are praised when they succeed but mostly forgotten when they don't. I am just now recovering after several months of not working, catching up on years of lost sleep, and basically becoming a person again.
There are days when I regret it and there are days when I don't. I learned a hell of a lot and I recognize it has opened doors for me, but the real question is was it worth it? And that's going to be different for everybody.
An important note, which is particularly relevant for HN. Paul Graham once said Sam Altman was the right person working on the wrong problem (with regards to his company Loopt). I bet there are a lot of people like that who just commit themselves to the wrong thing.