This is all hypothetical because I do not intend to marry or have children, however, if I did, this is how the situation would go about:
I would absolutely divorce. If our marriage was not working, I can tell you that it would be a pretty crappy marriage and there would be constant yelling and fighting and such so I would divorce immediately. Ideally, I could work something out with my spouse so that the children would still be able to have a relationship with them. It would depend upon the circumstances we broke up. If there was any violence, drug use or sexual abuse involved in our split I would not trust my ex. There are all sorts of things that occur like custody battles and stuff so I would try to make sure that I got the kids before divorcing if any of these things were a problem. If not, I would invest in a high quality attorney to get my children back, even if it put me slightly into debt, because my children would be the most important thing to me.
Assuming that the relationship with my ex spouse was a good one, I would allow the children to visit them whenever they wanted as long as it was reasonable (2am in the morning, not a good idea, nor when they have school or some big homework assignment due unless my spouse was agreeing to help them work on it) and try to maintain the best quality relationship with my spouse. It would be 100 times easier since we no longer live together or share finances, so I would try really hard to keep up a good relationship, if only for the sake of knowing what is going on over there when I lend my children out to them to make sure they are safe.
I would not date until all of my children reached eighteen. I believe dating is damaging to children who are especially young, and it is harder for children who are older to adjust from their parents splitting, let alone for both of their parents to be out dating and having a new relationship every few months. I would try to reason with my ex spouse about not dating too, but if they refused then I would be VERY VERY careful. I would make sure to meet each of my spouses' partners, and if my ex spouse would not let me meet their partners I would refuse to allow my children to go over there; bad things can happen to kids when their parents are dating complete strangers. If my spouse isn't willing to allow me to meet their partner or stay for five minutes to make sure my kids are comfortable, then there is probably something wrong with the relationship they are in.
I would try to maintain a good relationship with my ex's family and try to allow my kids to be able to go see their cousins on their other parents' side, grandparents, aunts and uncles etc. I would not want them to feel separated from that part of the family and if things were alright between the families I would try to occasionally integrate family outings and dinners with both sides so that the kids could feel some sort of connectivity on both sides.
Most importantly, I would not talk to my children about financial matters or issues between my ex spouse and mine, and if my ex spouse did or started sending messages through my kids I would find this absolutely unacceptable. The first thing I would do during a divorce is try to arrange some family counseling, with the spouse if it is possible, so that the kids know that even though their parents are no longer together that the family is ok, they will still see both sides, and that they had nothing to do with it. This would be even more crucial if my ex spouse was doing something I could not let my kids around; I would exclude the ex spouse from the family counseling and would start the counseling immediately so the kids understood what was wrong, what had happened, and that is was not their fault.