Going through a divorce when you have children with your soon-to-be ex is a challenging situation for everyone involved. One thing that you have to remember is that your children need to be a priority in the situation. They are going to have questions, and you are going to want them to make some pretty big changes. You can't think that they are going to handle things in the same way that you would, so be prepared to try to find ways that you can help them.
For parents who can still get along, one of the best things that you can do is to have a meeting together with the children. This ensures that everyone is on the same page about what's going to happen. Your children can ask you questions while you are both around to answer them. You can tell them what plan you have to make them continue to have an environment where they can thrive.
Having this joint meeting can also show the kids that you and the other parent are still a parenting team. They might be less likely to try to play one parent against the other since they know that you will be communicating regularly.
Another point to remember is that you can't shelter your kids from the truth. They are perceptive and probably already know that something is going on. Instead of trying to hide it from them, be honest. This doesn't mean that you have to give them the gritty details. Instead, just focus on what they need to know.
Try to keep a positive attitude with them during the split. They don't need to share the burden that comes with divorce. One way you can do this is to work out the parenting plan and other divorce aspects as amicably as possible, so you can start a new life with them.