Kids also learn by example. My parents divorced when I was five, and my sister and I recognized that not only did our parents still love us just as much as before, but they no longer argued. Everyone was much happier. I'm not sure I would respect either of them today if I had been raised in a loveless home. I know I'd have no idea what a healthy relationship looked like if they hadn't remarried people more suitable for them.
My father was just as involved after the divorce as beforehand- maybe even more so. Divorce does not mean the absence of a father figure. If he isn't involved now, then he's nothing more than an ATM with an attitude. Single mothers can and have survived before without partners. It's difficult but it can be done, and then there is the possibility of finding a good partner. You should be 100% sure before walking out that it's what you want, but a marriage gone bad smells to high hell and should be disposed of ASAP.
Marriage is about two people living out their lives together. Children eventually leave, but the responsibility remains regardless of marital status, so I don't see how it relates to them so long as they are still well loved by their parents. You should not stay together for the children in general, although there are exceptions (like a disabled child who has more involved needs, for instance).
My mother told me this and as a hard and fast rule it simplifies everything: Don't ever get involved in anyone else's relationship. Be a friend and support her emotionally, but don't try to fix her problems. Let her make up her own mind without any thought of approval or disapproval from you- getting that close to the problem will only backlash on you later.
If she does need somewhere to stay, put a time limit on it and set out guidelines. After I divorced my first husband (abuse) I moved in with my mother and she charged me rent, which she put into a bank account and did not touch. At the end of the allotted time to live with her (six months), she gave me all the money from the account so I would have a nest egg of my own. That was the best help I received from anyone... besides free child care from my sister, maybe.
Hope this helped. Good luck!