how to get over a break up

My boyfriend just broke up with me out of no where and says I need to better myself before we can get back together. I agree I need to better myself because I’ve basically let my anxiety take over my life. But I feel like I should better myself for me and not for him. I’m still in love with him (we were together for almost 3 years) but I think it’s time for me to move on. What are some good ways to be able to get over this?