haven't been around in a couple weeks so new to this thread today. First, I'm sorry your wife is struggling, it can't be easy to be so ill you aren't even realizing that your actions and choices could result in the desolution of your life as you know it. Second, I'm very sorry for yourself and your children. You are in a difficult position, and then your children are in their own different yet heart crushing position. Mental illness is ugly and affects all who love the person, moreso when they are so unstable.
I do agree with posts from others that you need to safeguard yourself, you family home and the security of the children. From a non emotional view, it is easy to see that primary focus must be on putting legal protection in place to ensure that your children remain with you at this time, that hte family home is within your control (as in, it should be your home with kids at this point for residency purposes with something legal in place that doesn't give full rights to your wife, protecting you all in event something awful happens and she shouldn't be there for the best interests of your kids).
From an emotional standpoint: i am the child of a bipolar mother who was unstable in my childhood. How I prayed for a adult, a parent, who could have guided me through the process of coping with my mother and her illness, and a parent who could have protected me from the affects of her actions as she cycled with her disease. Instead, I cycled in and out of the foster system. The reward for that was simply surviving it. The long term "gift" that gave me, was a lifelong diagnosis of post traumatic stress disorder and anxiety/panic disorder. It gifted me years of therapy and it destroyed any chance to maybe later in life get a good relationship with her. I am very glad to hear your children have you in their lives and in their corner. In no way does that mean you shouldn't possibly decide to be willing to work on a long term resolution of your marriage. I can see though that she is unwell enough at this stage to be in no position to participate in a marriage, let alone as a parent who can make good decisions for the children. With addiction there is some level of insight they need to stop. With mental illness there truly are times they do not see it at all, or see it differently than the average outsider would.
Again, from a practical point of view, getting legal measures in place to secure your childrens home and ability to have stability with a mentally rational parent in charge of ALL decision making, is really the best option. It in no way rules out anything you and your wife might want to do towards getting her well and your marriage on track. But that isn't the status of the situaton right now, and she isn't well enough to even decide if she wants a divorce let alone if the marriage and raising children is something she can reliably participate in down the line. It requires in tact mental faculties, which she isn't in posession of right now. You and your kids have nothing to lose in getting legal measures in place to ensure certain things at this stage. There may be alot to lose if the opportunity to show how her illness affects everyone isn't utlilized at a time when it is simply obvious she is not in a good place right now. The kids do just need someone to make steps to be able to assure them of certain gaurantees. I've learned with my mother that love is not enough and patience is not enough and wishing them better isn't going to fix things. We can hope or pray they improve and love them all through their struggles. But that doesn't mean that we don't also have to at times protect ourselves or the rest of the family.
many warm thoughts to all of you. Not one of you, your wife included, should have to go through any of this.