Prevention is better than the cure, but if you’re stuck in a haram relationships, you can free yourself through faith, determination, and strength. It is either an endeavor for marriage, or – if it proves impractical – then one is to end the relationship there and then. Do not give her your Islamic justification for your decision, do not give him farewells, but walk away, lock the door and throw away the key. With time, the pain of separation will ease, until one rediscovers himself, alone with the bigger picture of life.
Source: https://youtu.be/B-9QVZk1X1I