I don't want to hijack. But yes, in my case things worked out pretty well. The wife accepted counseling and medication (which is unusual for borderline personality) and we were able to mostly hide the marriage problems from the kids. 5 years later things appear to be great.
In my heart, though, I know that things will never be the same. I'm willing to sacrifice myself for my family, and the truth is that things haven't been that bad over the last 5 years.
But my feelings for her are not the same, I haven't forgiven her, and I will never forget. That's why I advise the OP to divorce. That feeling in the back of your mind can drive you crazy.
ETA : To answer the original question, yes I think it worked out for the kids. We mostly hid the fighting from them and now, 5 years later, I doubt either of them would remember the problems mommy and daddy were having.
However, I think my case is an exception. Despite my choosing to stay with my wife, my advice to the OP is to get the divorce. It has been very difficult on me.