Your husband seems to have trouble with committments - Always believing that the Grass is greener on the other side.
You need to go through your anguish and pain - don't suppress it when you are in private. But keep it hidden from your kids. And if Expressing your anguish or your desparation for your husband is pushing him away, then you need to hide those emotions from him too. Each person is different - if one method isn't working to bring your husband closer then try something else. Just avoid being demanding or nagging - all men hate that.
Just like the rest of us, you need to find strength in yourself - and most importantly, focus on your children - they need you.
Have hope that your marriage can be saved. Do all that you can - so you can know 5 years from know that you did everything you could to save your marriage.
You have two fights on your hands - a fight to save your marriage and a fight to get fair divorce terms on the other. You have to work on them both.
Be sure you get fair legal terms - H walking out on you and the kids is in your favor for custody.