I've been in similar situations before, and even quite recently and I've started taking a more stoic approach to work and it's greatly helped my metal health.
That is to say, I focus on what I can change or improve and let someone else deal with the rest. I've put too much energy in the past on things I can't change, broken processes that everyone else is completely OK with, lack of testing/CI, horrible leadership teams, bad architectural decisions. If I can change any of those things I do, but a lot of time it's political and really difficult, you often have to "boil the frog slowly."
I also try to squeeze the absolute most I can out of the job to advance my career. Any chance I can to gain a new skill or improve existing ones, or just work on something interesting, that's what I'll do.
That is to say, I focus on what I can change or improve and let someone else deal with the rest. I've put too much energy in the past on things I can't change, broken processes that everyone else is completely OK with, lack of testing/CI, horrible leadership teams, bad architectural decisions. If I can change any of those things I do, but a lot of time it's political and really difficult, you often have to "boil the frog slowly."
I also try to squeeze the absolute most I can out of the job to advance my career. Any chance I can to gain a new skill or improve existing ones, or just work on something interesting, that's what I'll do.