If there is one focus during a modern divorce proceeding, it's this: The children's best interests. That's what the court focuses on, and it's what you should focus on as well.
One of the best ways to do this is by refusing to use your kids as "game pieces." Don't put them in the middle of it. Don't put them between you and your ex. Don't make this harder for them than it has to be. It's already emotional for them, and you want to insulate them from that.
How do parents make the mistake of using their kids as pawns? Sometimes they negotiate using them. One parent says that they'll fight for sole custody if the other does not give in to their demands. This makes the children feel like an asset, not a loved member of the family.
It's also fundamentally opposed to their best interests. They should get to see both of their parents. Even if you no longer love your ex, your kids still do. Your ex also loves the kids. You don't want to ruin or eliminate that relationship just for your own gain or out of spite.
If you really put the kids first, then, you'll work to set up a joint custody schedule that allows your ex to stay involved. There are exceptions, of course, such as child abuse cases, but this is often the ideal setup.
As you and your ex move forward with your divorce, make sure you carefully consider your children, their best interests and the legal options you have to protect them every step of the way.