Toxic Relationship

How exactly do you heal from a toxic relationship? I just broke up with my bf who often compared me to other people, tore me down emotionally and said that he likes barley talking to me, not flirting and being distant....but still liked hanging around me.🙄 He keeps finding ways to contact me after i told him that i needed space, but the damage has already been done.