Sadly the time together compounds the impact of losing someone for whatever reason. Him breaking up with you is in the top few that just make things worse.
Losing a relationship in this way is akin to a pebble falling off a cliffside. If the relationship was relatively short it is like a minute fall of a few inches or feet. Long term it becomes something akin to the ever-growing terminal velocity achieved in a lengthy fall to the ground. It takes a lot to fill the crater left in the heart from such an impactful circumstance.
I wish I could share some happier insight but there is no fast path.