Harrasment from ex boyfriend

I had a boyfriend 3 years back and at that time I was naive so I trusted him. But with time I started noticing his unusual behaviour like abusing on phone, talking like shit and forcing me for physical relationship. Then after few months of relationship I get into touch with one of my old friend and told him about my boyfriend he immediately told me to leave him as he told me he is not a good person. My friend told me he has taken loans from people and is not returning money back and he is a characterless person. After some days I also found out about these things and I immediately broke up with him. But then he started blackmailing me to stay by saying that he will tell my family about the relationship. I refused to stay then I got to know he has my private pictures also that he will leak. But I didn't stepped back. Later he made fake I'ds on my name putting our photos as profile. He contacted my friends to talk to me. He has spread the photos all around to everyone. He is stalking me. He is torturing me mentally. He is threatening me. What should I do so that my family also don't get to know about this and he is also handled?