The situation that you are contending with is an extremely painful and serious one.
I can empathize with your pain and sense of hopelessness.
Having the ex enabling her to get more drugs in a bid to get her back is horribly wrong and shame on him!
Taking her pain killers away from her is not stupid, but it is futile I'm afraid. she will simply get more or become hostile.
She has a serious problem, unfortunately she does not see it that way.
I'm going to assume that this has been going on for a few years, and has now come to a place were the problem is bigger than the family can handle.
First stop arguing with her, she can not or will not see the problem as a serious issue, and will only end up defending her addiction.
sit those kids down and ask them how they see the situation, they are old enough that they will be able to articulate their thoughts and feeling about the matter. They need to be heard too.
It will be better if they are aware that what is happening is not their fault, and that the significant adults in their life are aware their is a problem and are doing everything within their power to lovingly and compassionate deal with it.
If the children are not included they may side with their mom, which normally would not be a problem, however since "mom" is addicted she is not thinking clearly, and he focus is centered entirely around her addiction. You don't want to be in a situation were you are contending with "mom" and the kids too, you need those kids on your side. don't place blame, and do not speak about their biological Dad, when they are aware of what needs to happen to help their mom they will probably come to their own conclusions about their Bio Dad's behavior, and hopefully will let him know that he is not helping the situation.
Letting her family help you save the family home is a tough call, but only you can sincerely make that call. this addiction is wreaking havoc in the whole family, so you are going to have to make a decision as to whether saving the home is good for you and the kids or if letting it go will help your wife see her problem more clearly.
You are going to have to take on more responsibilities like shopping and paying the bills, do not give your wife money. If she is working and pays for some of the bills and what not, let her know that if she gives you the money that you can take care of the bills and shopping. The money that she has left, you can not do much about.
Seek out support from your local family support groups, ask the kids if they would like to come along, if they do great if they don't no problem, it's an open offer.
Go see your local metal health, let them know what is going on and that you are at your wits end and suicide has become an option for you. It is not a good one, but all the same if you are thinking it, then it is really time to get some understanding and caring support, while you gather up your strength and courage, to do what is necessary for you and those kids.
go talk to your local addictions counselors. Not sure what their office is called, here were I live it is called AADAC.
Talk to mental health about whether involuntary treatment would be a solution to detoxing and getting your wife to see more clearly.
Take the options they present to you to your in-laws and include the children if the workers say it is appropriate to do so. Would be better if the counselor you are working with could be present at the meeting as well.
The wife should not be present at this first meeting as you will want the family to be on the same page before speaking to your wife.
After having the family on the same page and the alternatives set out and agreed upon then bring your wife into a family meeting, preferably with a counselor trained in family interventions, dealing with addictions.
A good addictions or mental health worker trained in interventions will be able to help the family learn how to intervene in an appropriate way. an example would be, be specific when talking about feelings evoked by certain behaviors. IE: I became afraid when you took 10 pills instead of two like the prescription says. Or I feel sorrow when we argued in front of the children last night, and the night before, and two nights before that. I got really scared three nights ago when I tried to wake you up, and was unable to, because you took to many pills and they knocked you out.
Those are a few examples.
If treatment is the solution, have a bed ready for her, and if she is willing take her to the center asap.
If the professionals deem it necessary for involuntary treatment, they can help you with that too.
There should be some intervention in a bid to get her to voluntarily get her to see the problem the addiction has caused in the family, and a willingness to do something about it.
However, she may be at a point were the addiction is paramount to her aside from all else.
Get your self support and help.
Involve the children as much as appropriately possible.
Get the in-laws involved.
Seek out a professional or professionals.
I hope that this helps somewhat to give you some direction.
You are not alone, if you need someone to talk to or want to give an update on what is happening that would be appreciated, as I do care.
Hugs
Tammy