IMO, you haven't wasted years. You've come to a very valuable realization about yourself and the kind of relationship you tend to get involved in. Take some time to reflect on this. Read Codependent No More. And please take some time to yourself, away from him and his toxicity.