I totally relate to this story. I was in an identical position just over a year ago.

I spent 6 years co-founding a startup (though because of my age I was never recognised as a founder). I put so many hours into the software, evenings and even some weekends. The codebase was almost a work of art, built for the long term. And the business would have scaled up with the system I had built.

The directors however were clueless. For 2 years they didn't have a clue how to sell the product I have built. Even though it was clear as day to me how to take it to the market we were targeting. Eventually they cracked it and we started selling lots and, at the time I left, the firm was doing £1mil in revenue. It's probably a third higher by now.

It was my first job out of Uni. and in hindsight I was a bit naive. Though not entirely naive as I remember having many thoughts through the years thinking that things "didn't feel quite right". Something was off. I was putting in all this work to build an awesome product. And the directors/sales guys were putting in only a fraction of the effort, and always far away from hitting any high notes.

I learnt that one of the directors was siphoning out money of the firm into one of his other companies, through dodgy service contracts between the two. It seemed every month or two he'd start saying we're struggling to pay the bills even though we'd just made £60k that month on new customer sales alone. This was a 4 employee company making 60g's most months and it was just so obvious all was not as it seemed on the books. I once calculated the firm was making a clear £300k profit and yet I never saw a single penny of that through a dividend. Not even as a bonus.

Eventually I realised I could not stay there any more, despite having a small shareholding. I told them a year before I left that unless something big changes in the way things are run then I shall be leaving. Possibly a stupid move in hindsight as this pretty much put the nail in the coffin of my relationship with them and of course I didn't see any salary rise that year, not even inflationary.

I left on good'ish terms, even if one of the directors started an e-mail argument (a "see you in court" type affair) with me a few weeks later accusing me (falsely) of secretly starting up a rival company. Ludicrous.

I'm still recovering mentally from the whole experience. Obviously what I've shared here is barely a 5% of what went on. Some day I'll write an epic blog post about it I'm sure. I certainly went through some dark periods but I'm on the mend now and have learnt to channel it in such a way that I learn from it and to make me better equiped for the next time I do a startup.

The way I see it now is, those 6 years at this startup weren't a complete loss. Sure I didn't get to cash out my shareholding (though maybe some day I will, as the firm is still successful thanks to the product I built). But I was living at home and taking home £40k which is a lot for someone the age that I was. I saved pretty much 85% of my money and ended up with a huge deposit to put down on a London apartment. I moved to London early last year and have moved on with my life.

I would encourage the OP to break free. Don't take a month off or anything as that will only make you feel worse. The best thing you can do is get back on the horse, get a new job, maybe even move town/city if you have to. You need to press the gas pedal on your life for at least 6 months, that's what I did, to help you move on and forget. The worst thing you can do is quit the job and let off the gas pedal. That could have dire consequences for your mental health.

Hope this helps.