How do I exit toxic relationships in a Godly manner without being hurt or causing it?

Praying and fasting is very beneficial and key to exiting a toxic relationship in peace -I fast and prayed for two years prior to leaving my husband. I believe had I not done that I would have been a mess because he was the love of my life and I was still in love with him. Leaving when it was time made it easier for the both of us. I was able to leave with a peace that I would be okay and I was doing the right thing.