When I look back on why I was mentally not there when my kids were little it was because I was completely over-whelmed. I did a good job, but I was at my limits and no room for wife or children mentally. I felt dissociated from the people around me. I was always thinking about a computer programming problem. I wasn't aware that it was so bad until my wife asked me to leave after repeatedly telling me I needed to change. I didn't know what she was talking about. I wasn't "present" for her or the kids. I couldn't do it all.
The problems are gone because I don't program anymore, I did therapy and take depression medication. I've learned how to be in the present moment without dread or fear. I say this because you didn't mention external stressors so maybe you aren't conscious of them like I wasn't.