
A therapist will also help with the shame you're feeling now. The thing is you should work on yourself first so you can be more supportive to your wife (if she sticks around) and your kids. You can't give out of an empty bucket.
FWIW, I didn't get diagnosed until I was 46, and I was misdiagnosed with depression for over twenty years.