"When, if ever, is it moral to leave your wife if you have children?"
I would argue that the existence of your spawn is wholly irrelevant to the question of the morality of leaving your wife. Your marriage is between you and your wife, not your kids.
A marriage is an oath between two consenting adults (and the almighty GOD, if you believe in make believe). So, it is fair to change your question to "When, if ever, is it moral to break your oath to another person?" To this, I'd answer that it is never moral to break an oath. That's the reason that an oath has any real meaning behind it. If you give someone your word that you will love, care, stand by them, etc, then there is a moral imperative for you to actually follow through. Without that moral imperative, your word or oath is really nothing more than a casual statement. No, it is never moral to break an oath.
"But she's all crazy and we don't get along well and..." Tough, you should have thought about that before you committed to her. Sorry, but before you give someone your word, you better make real sure that that someone is the kind of person you won't mind following through with. Come on, you wouldn't marry someone you just met, would you?
All this is not to say that you shouldn't get divorced. I don't know you, maybe it is in your best interest to get divorced. Maybe it's in society's best interest that you abort the one in the oven so society only has to deal with one screwed up kid as a result of your doomed unholy union. Who knows? But the question of "should" is entirely different than the question of "moral". Act in your own best interest, most people do, but don't pretend like it's the moral thing to do.