OP, I'm a former legal secretary, and while that doesn't qualify me to give legal advice, I can tell you what I would do, in your situation. I would take pics of all prescriptions for spouse's mental illness, and copy any health records I may have documenting same, as well as all financial info. I would not let my kids out of my sight, no matter what. I would ask the attorney about an emergency custody order, based on spouse's mental health history, and fact that spouse currently is hearing voices telling spouse to do things that could be fatal. I would also file for supervised (by either a DHR caseworker or myself, NOT a relative of spouse, which is very common), limited visitation, to be set around my schedule, not at spouse's convenience. I would also include that said limited, supervised visitation continue until spouse can prove unequivocally that spouse is med compliant, and progressing well in treatment.
Now, where I live, an affair with a satanist would definitely be a consideration in a custody/divorce action, but ymmv. The main consideration is, of course, keeping your children safe, while your spouse gets help.
Your attorney will be able to subpoena health records, if it becomes necessary.
So sorry you're going through this. I've seen it many times, and it's always difficult.