Let's be clear about what we're talking about. Leaving the relationship does not necessarily mean you leave the family home and fret over how the children might react to that choice. In some jurisdictions you can stay and petition the court to have your soon-to-be-ex-spouse (stbEx) move out. You won't know if that's a possible option until you get some legal advice and options/strategies in a few interviews or consultations with lawyers or solicitors. You do this well before you decide which lawyer to actually hire.
A reminder here... You have the right to privacy and confidentiality. You do not share this sensitive topic until you're prepared. Sadly, this would not be a time to be overly fair or overly whatever since your spouse wouldn't reciprocate similarly.
You do share information - carefully - if you're seeking to repair the relationship. If you've concluded the relationship has no future then you shift goals and limit sharing to legally required matters such as finances and pertinent child care topics.