There are many things to consider. For instance, family courts often award joint legal or joint physical custody. In the tax world, though, that does not exist. Custody for tax purposes relates to which parent gets to claim the child on their taxes. That tax credit goes to the parent with whom the child spends the most nights with during that year.
Communicate with your ex about who is going to claim the child(ren). Communication might be the last thing you want to do, but it is worth it. If one parent claims the child(ren) first and the second one also does without knowing about the other, then both refunds are held up in the process. Each parent will receive a notice requiring them to show proof of entitlement to the claim, which means proving how many nights during the year the child(ren) were with you. This process will take way more time and energy than if you were to just have communicated about it in the first place!
It is worth looking into the actual tax break that you are getting by claiming the dependent(s). So many parents are too invested in "winning" the battle to claim the dependents that they fail to look into the financial value they would receive based on their tax bracket. There are so many calculations involved in dealing with combinations of child care credits, earned income credits from support payments, child tax credits, the ages of the children and the costs of their needs, just to name a few. The best advice is to sit down with your tax professional and have them work out all of the possible scenarios so that you are making the best financial decision for you and your children.
Keep separate tax professionals. Once the finances are separated, it is good to keep the taxes that way too. Seek out your own tax professional for help. They will be able to look at your personal situation, analyze the many possible formulas and help make the best decision for you. The first year can be especially tricky, so you want to be sure to have someone who is looking out for your best interests alone. If you and your spouse started living apart but the divorce is not final, be careful about filing jointly, as you are both liable for payment to the IRS. Even if it says one person is liable for payment, the IRS will come after you if your ex can't pay. Finding professional help that you can trust is worth the cost when it comes to taxes. It can be so much easier for your tax professional if you keep good records. Good records mean new habits. There is just too much at stake. Ask someone you trust for a recommendation if you don't have anyone, and then let them help you!