Hi Spirit Wing,
I can relate to a lot of your original post: feeling depressed, deep anguish, and sorrow. Giving up on the marriage and presuming he will be given full custody of the children. I have been there. There's a pretty full description of my early experiences in this section of the Relationships forum.
I haven't posted my own experience lately ~ anguish ~ in this section for a while. My anguish is unrelenting. I blame myself for everything. My ex is responsible for many things, but I take the ultimate blame. Meaning: it all started because of me. I should have done X, and shouldn't have done Y & Z. The very core of my being is self-hate. Almost everything leads back to that. Positive aspects are looked aside, not accepted to be "real" or important. Other people can point out those positives all they like, but it is very uncomfortable for me. I have to tell myself to appear gracious and thank them for the compliment. NOT easy at all!
As you can see, I could go on and on with this.

My ex and I worked in mediation to make the divorce as little traumatic (for our girls) as possible. It did make it long and painful, but it was worth the pain to me. The idea of my young girls going into court terrifies me. Anyway, I have worked hard to be healthy and be a good mommy. It has been an incredible challenge for me. And very hard for me to tell my attorney that my ex should be the primary provider. I bawled my eyes out ~ but I knew that it was true. Admitting that I can't is painful every time.
We decided that I'm responsible for the girls about 45% of the time (give or take 5%, it fluctuates). I have devoted myself to being there 3-5 days/week. It depends upon his work schedule. My doctor appointments, group meetings, and helpers are every on Tuesday and Thursday. Every other weekend is spent with the girls.
My ex and I were lucky, in that attorneys who specialize in mediation have taken our case pro-bono (free). I am disabled, from a brain injury and depression, and live in an apartment for disabled people. I receive financial and emotional assistance from the local government. I am doing the best that I can do. Accepting that fact is tough, but I have to accept so I can get past the endless misery.
I hope that you can understand what I'm trying to say. It takes a while for the "right" words to pop into my head, and I get a little lost in the point/s I'm trying to make. Frustrating for me to go through, but I also think that sharing my experience/s may be helpful to others. Damned if I do and damned if I don't.
Take care!