I'm sorry that happened to you. My own experience with burnout was pretty damning, but oddly, that happened with a career that was far more aligned with who I really am than my current career. There was a click, for me, that made me realize I cannot define myself by what I do for a paycheck and since then, my current career rarely comes up in IRL conversation, contrary to my HN history (which has more to do with my job being tech-related, so it fits in the context of HN comments).
But you touched on something that I struggled with for years; a sense of belonging. Humans are, by nature, fairly tribal. That's both a good and bad thing. However, we as individuals have to be mindful about how much we are acting on our sense of belonging. At the extreme end, when we let our desire to belong to something larger than ourselves call the shots, we tend to get radicalized or fall into religious zealotry. On a more day-to-day experience, our sense of belonging can drive us to seek external validation from people who simply will not offer it, which spawns things like discontent and resentment that cause more irrational behavior and damage your self-worth. It's a slippery slope.
What I have found is that being mindful about self-validation helps mitigate that. Reminding myself that I am good enough despite my flaws, I was not born to toil/be busy/make someone else rich, and my experiences and perspectives are valuable to me have become tools that help me make decisions about work/tasks that strategically avoid burnout. I never offer too much, and I know my limits very well, at this point. The result is most people see and respect that about me, where the ones that do not will quickly lose interest and move on to find someone they can successfully abuse.