M, I don't know how old your children are...but here's what I would say "daddy's trying to find himself and until he doesn't we have to be patient".
Your children will not understand what is going on w/him except that he's acting very strange. Unfortunately your h is trying to attract people of the age he's stuck in. He doesn't want to focus on the fact that he's almost 40 and by this time, he's suppose to be acting like a mature adult.
I feel for you. Been there, done that!
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.