how did you stop being friends with someone that made you feel bad?

i just thought about it and discussed it with my best friend and i reached the conclusion that i don’t need a friend like that, so i just cut him off (told him about it and then just blocked everywhere and stopped answering any messages).