It’s just like me having a basketball for 3 years, I can play with it all I want but the time it starts deflating, the duration I had it for means nothing, it passes its expiration date (in other words). So I can’t play with it again...
Same thing is happening here. Just because you know him for 3 years does not mean he will make you at your happiest. He’s ignoring you after you show him the slightest interest, even after he blocked you - you still ran back to him. Why?
I echo the above poster. In the meantime, find someone new to distract yourself from him. That’s the only best advice I can give here.
My recommendation would be to get rid of him, cut him off completely, and at least for the moment, don't replace him. Instead, take some time out of dating and looking for a partner, and focus on loving yourself. Develop a bit more emotional independence, do things you enjoy, put joy and effort into your work or your studies, and try to get to the point where you're happy without needing attention or validation from a romantic partner. Then, if you want to, you could think about dating again, and you'll find yourself on a much more even playing field. When someone like this guy does you wrong, you will be more able to recognise that and cut them off more easily because you can be perfectly happy single anyway.
Remember that you deserve to be happy, and only accept the company of people who consistently give you what you deserve