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.