I don't know. I suppose that if there was reason to suspect that the person was so overwhelmed by their depression and suicidal thoughts that there is a chance that a child be at risk because of the parent's state of mind, I am sure intervention would need to happen. These laws aren't designed to interfere (even though that is , uinfortunately, how they sometimes play out) but to protect chidlren when their parents aren't able to do so.
If I had a friend feeling this way, I would encourage her to find a support system for her child and herself and then go to a counsellor for the help she needs. Knowing that there are other adults around helping to care for the child/ren and giving the parent some relief makes a difference. If, on the other hand, I were a counsellor of any sort and someone showed up in my office with a baby or child or two in tow because she couldn't find childcare and began talking about suicidal thoughts, I would be very concerned.
I don't know at what point people are involuntarily committed to a hospital when they ar suicidal. I expect that if they are actively planning a suicide or talking seriously about it and not responding well to intervention, then they would be committed. However, I am NOT a mental health professional and I do not know for sure.
No one wants families to be separated or for children to go through the trauma of being removed from a parent. On the other hand, home can be traumatizing if a parent is unwell and there are not other family nmembers stepping in to help out and protect and care for the child while the parent works through their difficulties. It doesn't mean it isn't a loving home, but temporarily the parent cannot do it alone. I was raised by a single mother who was very unbalanced emotionally but was able to hide it well - and very good at teaching me to keep it all a secret. I talked her out of suicide countless times over the years, starting when I was a preschooler. I always had a plan in place for what to do if I woke up one morning and she was dead or if I came home from school and found her dead. Sure, my family stayed intact and CPS never got involved - but they should have. If my mother had been committed at some point and received the care she needed, our lives would have been much better once the crisis passed. I would have gone through the trauma and upheaval of being removed from my home, but I would have been spared the ongoing trauma of my mother's illness and dealing alone with her suicidal tendencies. Knowing that there were people caring about my well being would have been less traumatic than dealing with everything alone.
Can you call a local mental health association and ask some anonymous questions?