This must be truly horrendous to go through.
Unfortunately, because of my own issues I'm not a reliable person to have an ongoing conversation with on a Forum like this; I tend to disappear and reappear and as much as I want to be able to make and keep promises don't have the control I want over my own availability. But, at least today in this moment, I want to send what love I can and let you know that you are heard, and I'm thinking of you.
Needing support to function (something I strongly relate to) can be such a constantly painful and chaotic dynamic to navigate in relationships and I know how devastating it is to also feel alone, and/or to be alone, when supports you once had burn out, change in nature, leave altogether or otherwise move on, especially in such a dramatic scenario as a marriage ending.
From the bottom of my heart, I'm so sorry that this has happened to you. I can only imagine trying to hold it together for a kid at the same time. I'm no expert or professional and I hope this comment is ok to make; in my humble (but from where I sit what seems like experienced) opinion it's important to find some appropriate level of openness with children involved in a devastating situation about what's going on. A lot of times adults think that if they keep as much difficult grown up business away from kids as they can it will help them not to have to see or face all the negativity, but in my experience kids can often pick up more than adults think, and internalise it as being their fault or something to do with them.
So even though it's awful that they are affected by a negative situation, they are affected whether you are open with them about it or not, so it can be helpful to at least explain what's happening, and be "appropriately" real (not in a way that puts the burden on them of figuring out what to do or taking care of adults) about how things are affecting you, and that it's ok for them to feel whatever they're feeling as well.
It might even help them as they grow up to understand mental health issues better, doing the work of steps toward removing stigmas and through example showing them how to find the tools to cope or help where they might encounter similar issues in themselves or others down the track.