Parenting is for life. It's not optional, it's a commitment. When a relationship breaks down parenting takes on a whole different aspect and requires a whole different set of skills.
The essential goal is to limit the damage to your kids by accepting the realities of the situation and attempting to reduce their trauma as much as possible.
The key to making it happen
All divorces are stressful and the legal aspects of the divorce process add greatly to the trauma. The most important influence in determining how this will affect your children is the situation between you and your STBX (Soon To Be eX). The more stable and rational things are between you the easier it will be for the children to cope with the new landscape of their lives.
Look, nobody said it was going to be easy and this is one of the most difficult bits. Nobody wins in hand to hand divorce combat. Slugging it out in muddy trenches in the First World War didn't work then and it doesn't work now. You just end up dead or very badly wounded.
Being caught in the middle
This is a bad place to be and one where many children of divorcing couples find themselves. It's a direct result of a warring couple who allow their fight to spill over into family life. Because the children witness this public brawling they will almost always end up taking sides.
Once that happens then the damage has already been done. Never encourage a child to take sides with either parent. In the long run it will do you as much harm as it does the child.
Allowing the child to love both parents
The love of your children is something that should not be squandered in the headlong battle for every inch of advantage in the divorce process. This can only be avoided if the children are allowed to be in a space which is shielded from the emotional maelstrom going on around them.
Do all you can to let the children love both of you. This will provide the foundation of a good relationship with your children which will last forever. Long after the agony of the divorce has faded away you will be able to enjoy a good relationship with your children and grandchildren. And that's priceless.
Creating a more relaxed atmosphere
A divorcing household is never going to be a relaxing place to be. It's going to be stressful and at times downright impossible but don't (that's both of you) lose sight of making every effort to reduce the bad stuff and do something to break the tension.
What's to be done?
Do something together that you enjoyed in the past. An outing, a movie/DVD, everyone's favourite Sunday lunch. If none of that's possible then just agree with your STBX not to shout at each other in front of the children, at least at weekends!
The skills you need for a good divorce are hard to learn and have to be learnt on the job, which makes it the more difficult. They are skills you never thought you were going to need and now you realise they are skills you cannot do without.