How can I leave my boyfriend on good terms

He’s aggressive and toxic but I am full in love with him there’s nothing I wouldn’t do for him but he’s gone to far and I need to leave I know this will be so hard I don’t know where to start I don’t want to leave on bad terms either how can I end things in a nice way?