Right for starters this is an awful position to be in and I don’t envy you in the slightest but your first priority is your children. Ofc we want moms to be in a great position kids thrive when both parents are doing well but her wellbeing is a secondary concern, kids need to be safe.
Right now she’s struggling and the best thing you can do for her and the children is making sure they get the help needed, she isn’t going to see it that way but she is letting her children suffer because of her mental health. I imagine she not doing this on purpose but not being on top of medication(huge red flag) not maintaining a school presence is going to have long term effects on a wide range of aspects from learning to social skills.
If your truly worried about her doing something extreme then you need to get in contact with the right organisations so the help she needs is within arms reach and adhered to. These organisation can help her get back to a point where she’s on form as a parent and able to be a participating parent.
You don’t want to be in a position where something truly bad happens and you look back and decided that the outcome for her was the main huddle for you to take the kids.
Better to do what’s considered a little harm now than wait and possibly deal with a lot of harm in the future.
I hope it all works out for you and yours.