I can hear how much you are hurting and the loss of your children is so overwhelming for you. I'm sorry that your husband left and is fighting in court for the children. I believe you when you say that have never been harmed by you, the way parents who have mental illness get treated even by partners can be extremely unfair and wrong.
I know you don't want to be talked out of suicide, and this is a safe space for you to be listened to about this because it's a very scary thing to go through. I will say though I hope you consider some support to cope with and talk about the loss of your children. It won't be forever, they will grow into adults and I expect be allowed to see you then. Suicide is forever though. I won't go on because I know you don't want to hear it, but it would be remiss of me not to mention.
You sound like you're hurting a great deal at the moment, it must be very isolating to be having these thoughts so I hope you'll stick around here and keep chatting with us.
And of course, I hope the outcome in February is that you get to keep your baby.