Oh God no, do not stick it out for the kids.
I can't speak from the spouse side of the situation but I can for the kids involved. Staying together for the kids is the exact wrong thing to do and isn't doing your children any favors. My mom stayed married to my dad way to long because she thought it was best for us, meaning my brothers and me. Oh boy was she wrong. Kids aren't stupid, we (and they) know that something isn't right and it makes for an unhappy house. The times my parents were separated were by far the best times growing up.
Perhaps other people had different experiences but if one parent is miserable it trickles down to everyone else and I personally think it is terrible to do that to your children. My mom had the best intentions but we are all unanimous in wishing she had made a different decision 22(ish) years ago.