Trying to keep a relationship together "for the kids" is usually harder on the kids in the long run than letting the relationship disolve naturally and moving on to a happer life. If she's decided to go back to her ex, I'm afraid the only thing you can do is support her and be there for her and hope she comes around. I've recently been through something similar.
My g/f has 2 kids, ages 5years and 3months, neither are mine but I've known them both since birth. She's been through one bad relationship after another, including an extremely violent marriage, and only recently realized after 12 years of friendship that i've been the only guy to tell her he loved her and mean it. In my case it worked out, all I had to do was wait until she saw me for the man I am...All I can say is good luck, keep loving her, and she'll probably see the light soon enough.