In my experience, it heals with time. Your job is to make that time as tolerable as possible. I’ve never experienced the kind of heartbreak that lasts potentially several months, but whenever it’s happened to me, I just dive into watching a lot of tv series, movies, playing video games. Anything to distract myself from the pain. Eventually you’ll start to get some perspective as time passes, and that’s the point where you can stop distracting yourself and actually start accepting the situation.