First of all it is so sad that this is happening to you, we have all been there here. This place really helps not having to be alone with all this.
I have wasted 9 years in this situation and I don’t know how to get out of it.
How many more years would you like to waste on that situation further?
How many more years would you like a friend to waste on that situation further?
If both answers do not match, you need to take a step back and start giving yourself the advice you would give a friend.
The thing is: after years of this type of relationship dynamic chances are you kind of have unfriended yourself in the process.
Everyone on this forum has gone through that, and part of detaching is befriending ourselves again.
Once you start doing that, it becomes easier to know how to get out of it.