What do you do outside of coding and family that makes you happy?
I went through a similar journey recently and I found that re-discovering the things that brought me joy has changed my mindset. Consider projects or find hobbies away from the computer, for me it has been basketball