One of my favorite books is ‘Flourish: A visionary understanding of happiness and wellbeing’ by Martin Seligram. It debunks the pathological perspective of mental illness and in turn addressed what it takes to flourish and be well. It lays it out so beautifully and in talking about virtues, resiliency, grit.
https://www.amazon.com/Flourish-Visionary-Understanding-Happiness-Well-being/dp/1439190763
It sounds like you have great self-awareness! I see what you mean about getting preoccupied with other people's problems, it can be unhelpful to both parties. I would recommend volunteering somewhere, which will provide you with some purpose and fulfillment, as well as help others who need it. It's also great for resumes and amazing for making friends. Most of my closest friends are people I met through volunteering at an animal rights organization, which is something else that gives me purpose.
It seems like you might be interested in the field of positive psychology. It was developed when a psychologist wanted to address the problem that, historically, psychology has focused on reducing pain and illness rather than increasing happiness. They've done a ton of research on human well-being since then, and many of the concepts are easy to apply to your own life.
If that sounds interesting, I recommend this free online class from Yale, as well as this book written by one of the founders of the field. The book is more about the history and basics of the field, whereas the Yale class provides tons of strategies to apply to your life. I took the class with some friends at the beginning of the pandemic, and ironically it was one of the happiest times of my life. I still use the tactics today - it's a really rewarding topic to learn about. Helping people and finding meaning are proven to be main tenants of well-being, so you're already getting started.