I'm on the same boat.
I've spend lots of energy on projects that nobody cared, eventually I lost self-motivation and stopped enjoying life.
The last four years I tried different medications with no results.
We live in a world where success is the main motivation. When you realize you don't have the resources to study AI at Harvard, or the contacts to make your product successful; That motivation is gone.
All I can say is don't be harsh to yourself. And remember you are not alone in this unpleasant experience.
Good luck.