Well, ME, two and half years post end of sociopathic relationship, I am finally coming to terms with it all.
I'm writing to you because maybe you'll post this and give some guidance to those recovering from a relationship with a sociopath.
Really, Buddhism is the way to go post-recovery. You need to get control of your thoughts and yourself. There is no other way.
Buddhism will teach you to let go of all of the anger, resentment, shock, and surprise at their treatment of you. Meditation will teach you to stop the negative thought spirals implanted by them (and carried on by you, of course). You must do this with focused effort.
Buddhism will teach you to view the sociopath as a teacher, and to be grateful for them. If this relationship is used correctly, it will make you a wiser, more compassionate, and give you a greater sense of your own agency. It will make you take care of yourself like you never have before.
So, yes, sociopaths do a service, ME. They are true predators - they cull the weak from the herd, and make those who escape grow stronger. In recovery you have to ask - which one do you want to be?