Toxic relationship

How do you breakfree of a toxic relationship when you have invested so much time. I'm so scared of starting over. :(