This is the mental equivalent of scratching open wounds, or poking your tongue into a cavity to prod the exposed nerve - you know it will hurt like hell, but you do it anyway.
It is part of the human condition, but unless you have been in tis situation, it's hard for people to understand just how powerful the grip of a totally unsuitable partner can be.
You have done the right thing in making the breadk - the practical side of your kind knows there is no future here, and it is only damaging you and stopping you from being happy. The emotional side of your mind will ignore such logic and continue to torment you, but you must be strong and fight this addicition - and that is what it is.
When the craving gets too much, write down what you think, better still, get a pocket tape machine and talk to it, then play it back when you feel strong so you can re-enforce your determination to avoid this situation.
It is hard, and it's not over yet, but there is plenty of support on here from non-judgemental AB'ers - stick with us, we'll get you through to the other sided.