If he is making a threat like this, you have to take it seriously even if it is shocking for you to hear him say that. People can have suicidal thoughts and what to look for is an actual plan i.e. does he say how he'd suicide, is he giving some of his possessions away, does he have the means to kill himself ex weapons, are there mental health issues/past attempts/depression, etc.
If you believe that this is just talk, you and another person close to you and him may talk with him about this issue. His words are affecting you and if he ever acts upon them, it would affect the children as well.
If you're not sure about what he may do, there are ways to get involuntary commitment in order (if that is what you want to do, because he leaves you no choice)
You can try to talk to him about what is going on with him (emotionally/psychologically) and remind him that even though you're seeking a separation, you still are concerned for him as an individual (his welfare ) and would do whatever is needed to assist him in moving on. This may have came as a shock to him and due to poor coping skills, he's threatening suicide, and maybe wanting to somehow punish you through that.
Ask him to speak with you as an adult and a father rather than withdraw into himself and entertain harmful thoughts. And, if you have to resort to involuntary commitment, you have that option at your disposal.
I have tried to help him and have asked others close to him but I think at this point he is too unwilling to cooperate in any way and its really making life difficult for me and the kids since I am trying to make this as easy on all of us as possible.
What is involved in an involuntary commitment?
Oh, if you've tried that route and he's unreceptive, you've got to do what it takes to help and to ensure your safety and that of the kids.
What state do you live in so I can see if I have specific info on involuntary commitment there.
1/ Generally if he's actively threatening to harm himself and you believe he's to act it out, you can phone 911.
2/ If he's not actively (at the moment) threatening, usually a probate judge signs a document called a lay affidavit and the sheriff dept picks him up and brings him to a crisis center for an eval. He may be kept there for up to 72h or more depending on his condition.
This is what the guidelines are in that state-
The likelihood of physical harm to self or others based on failure to obtain necessary medical care.