You block him on your phone, on all social media, and on any other form of communication that you may have.
You do not respond, ever, if he finds some other way to contact you.
You do not answer, do not open the door, if he comes to where you live. If he refuses to leave, you call the Police.
You move on with your life.
(And I agree that therapy would be a good idea for you.)