You have to be willing to let a job just be a job. No more, no less. Funnily enough, you'll often hear the same advice from older folks who own their own business. Even when the business is their own, they advise finding something else outside of the work to drive you.
The important thing is to have an invigorating activity you enjoy that is an outlet and not a chore. Work will always become a chore, that's why it's called work. Find that balance and you'll likely survive in the end.
I completely agree on letting a job just be a job. We are so much more than our work.
A phrase I was practicing a while ago was: "I am not my work, my family or my friends". I would repeat it a few times over and over. It helped me a lot to detach myself from my worries/expectations about work, friends and family.
I actually did a podcast on the exact same topic "You are not your Work, Family or Friends" that might be useful for someone: https://open.spotify.com/episode/5q1hAzjRCYkCEsLERvr1zE?si=Z...
Not sure if I'm going to find one for my whole life but whatever.
It is VERY difficult for work to provide your true meaning in life. 95% of software is personal preference. Most code will be thrown away when priorities change. Do the best you can and learn when you can. Management will always make poor decisions and are usually not interested in unfortunate truths. Work should only be what is required to gain money to pay for living.
The change has to be in you. Finding a hobby or raison dêtre makes waking up easy. Having something to look forward to is key. Once work is something to just finish changes everything. Respect your "you" time and turn off all notifications from work you can. Find something that does bring you joy and do that until it doesn't. Then search for a new thing. Too often we expect a brutal competitive job to also provide us peace and tranquility. They are best kept separated in my experience.