how long will it take to get over heartbreak?

I feel like such a puss. I’ve been single for almost two years. Last March (2019) my boyfriend of three years randomly broke up with me over text saying he needs time to focus on work (military). Two weeks later he was dating another girl. Everyone makes me feel like shit for not being over him yet. I try so hard to get over it but I loved him and I don’t even know why I hold onto it. I just want to live my life without thinking about him and holding onto the past.