Isolating yourself from the world isn't going to help you get any better. I stayed with a good friend of mine for about a month. I couldn't stand being alone after my breakup. I would just overthink and become depressed. Staying with my friend distracted me from all of that and a true friend won't stand around and watch you be sad so I was never stuck in a unhappy mindset.
Fuck Tom. Block, (ctrl alt delete ) him from your life and forget about him.