Not in an escapist way, don’t avoid how you feel, but throw yourself into your hobbies, go on a trip with a friend, read lots, learn to play that instrument you haven’t touched in years again, go to your local botanic gardens and learn something new, do things that bring you joy and don’t let yourself wallow.
After my last bad breakup I thankfully had a Europe trip planned and one of the best things I did was allow myself in the quiet moments to be upset (e.g. crying listening to the album I associate with that breakup on a ferry between two Greek islands with my hair flying in the wind), but putting myself wholeheartedly into every experience and moment I could.