Tagging on Cadet's posting about this is according to script. Yes, it is. Generally, they begin distancing themselves from us, then the kids, pets, home and old friends and family. If and when they begin to come to their senses and start to wake up, the reconnection will be in the exact opposite order.
They have to distance from us and the children because they don't want to feel guilty or have second thoughts about what they are doing. In crisis, they go back in time to a place where it all the hurt or lack of validation began. Once they get back to that place, their journey has begun and need to figure out the why, what if, etc. of how they feel. They need to learn that they are not at fault for what transpired back then. Childhood drama plays a huge role in all of this, but depression is the number one factor that travels with them throughout.
All you can do is be the best parent you can be for your children. Let them know that you are there to listen and encourage them. Right now, believe it or not, you are the sane parent who is their lighthouse in the storm. Keep the focus on you and your children and dig deeper for patience and understanding.
Sit quietly, the answers will reveal themselves when you least expect them to. The past is gone, the present is a gift and you need to focus on today, allow the future to reveal itself when it is ready.