This is what I feel during college university but for the opposite reason. Grade school and Highschool wasn't really the best years of my life, mainly because of bullying. The only time I was "happy" was when I can answer math problems like nothing and get the highest scores. Because of that, it lead to a chain reaction of me working my ass off in Engineering class to the point of my teeth bleeding and aneurysm due to too much gritting and staying awake for like 2 days. At that point I realize that everything I've been doing is not gonna result into anything other than me being broken mentally. I'm just doing it trying to relive the times of me being "happy", and maybe I thought that being smart academically will make me a lot of friends. Fell into a severe depression after that, but not to the point of outing myself.
Years later, I prioritized my mental health over everything and I kinda healed myself. I'm doing great now, I just resigned at my first job because its too much draining for me and I feel a lot of freedom doing it