Am I a bad mom?

I had an extremely hard conversation with my 17 year old last night. The last almost 3 years all I've done was try to help him. I have talked about our situation before but his dad had been selling drugs behind my back. I had no idea. Then his dad gave him drugs when he was 13. I found everything out because when he was 15 he almost died from a fentanyl overdose. His dad couldn't afford the drugs he was trying to buy. Almost got our home shot up while our child was overdosing on it and as payment this dealer SA'd our son and his dad just watched. Luckily he was too out of it to remember what happened. I've been trying to help him. He would do drugs. He's put his hands on me when he was high. I had to board up his window because he would sneak out to do drugs or get his friends pee because I would drug test him regularly. He had been sober for a while. Then he got his first girlfriend and I just felt like it was a bad idea. He's always said he was a burden and when they broke up he told me he's a burden and relasped worse than ever. He ran away for almost a week on a drug bender and got arrested. He's been back home 6 days after that and we talked last night. I've had him in therapy. He doesn't like to talk about his SA. I've sent him to rehab. At this point I took the boards down from his windows. I told him that I know he's gonna do what he wants but I want to help him. I want him to let me help him because he doesn't deserve to be in pain. He can decide not to take my help. He will be an adult in less than a year and he will make his own decisions and if they're to do drugs he can. But it won't be in my house. He asked what that meant and I told him I love him and he can choose to let me help him or he can choose to continue drugs. Just know if his choice is the latter he needs to find somewhere else to go when he's 18. He asked was I really putting him out. I said I'm giving him a choice. When he's ready to heal I'll be there for it. But right now I give up. He can do what he wants. Just be prepared to get out of my house as soon as he's 18. I said I'm not gonna watch him kill himself anymore. I feel like the worst mom in the world. I can't heal his pain and feel like this is a failure on my part. I hate his dad for turning him into this.... And hate myself for not being able to save him.

@z I did not edit my post. It already mentioned rehab and therapy and every post I've made in the past about him has mentioned him being in and out of rehab. If you misread my post that's fine but don't say I edited it. Also saying I was not there for him is fucked because I wasn't aware of anything going on.