This is the way, based on my experience and being in a similar place at that point in my life (now 40). Breakups are hard and 2 weeks is nothing. IMHO in addition to time, seek balance: socially (reach out to close friends, slowly make effort with new ones), keep your routines, exercise regularly, and realize your professional life can take many turns and its ok to pivot. You are young still and have plenty of time to develop new relationships and career paths, take a breath, take it slow.
If you cam afford to, also consider taking a trip a few weeks from now. Very anecdotal but i found capping off the low point youll go through the next few weeks with something novel can help you shake off the old mindset once you are ready.