Agree, and you will meet people at the gym. Learn to lift barbells, not machines. Powerlifters can seem intimidating from a distance but they are the same mix of people as everyone else: nerds, extroverts, introverts, men, women, gay, straight... and in my experience they are very open and friendly to those who are getting started.
If you want a guide to get started, Starting Strength is a good one. It's aimed at novices.
Also if you're in the same apartment/house and city where you were living with your partner, consider moving if you can. Get away from all the reminders of your old life that just amplify the alone feeling. Depression can be related to your situation. At least if you're in a new place, being alone can feel more normal and might act as a reset.
> Starting Strength
It's a great technical manual. But you have to be careful because a lot of personalities there and around US fitness culture are nazis and deeply unhappy.
I like to mix working out with Buddhism (eg metta meditation). They complement each other quite well.