I see a lot of good advice here, and I'm going to be late but approach it from a different angle.
If you've spent so much time with your spouse around, and now you're at home alone, and you're working remote, then you are going to need a lot of socialising outside of work, because remote work does not meet the same needs for seeing people in person (I've been there).
Humans are social animals, we need some interactions with others, and you are just getting way too little.
The issue is not 'how to be alone?', it's how to satisfy your social cravings with in-person interaction, once you have that at least some of the time, being alone for the rest of the time is much easier.
During 2020 and 2021, I think many of us were bitterly aware that Zoom calls and online stuff was no real substitute for genuine social interaction. Better than nothing, perhaps, but there is something so much better about being around people physically. (That last bit sounds a bit creepy, but hopefully people know what I mean!)
Yes, I very much agree. I think it is irresponsible to take antidepressants for something that is clearly an issue of "normal" life scenarios like hearthbreak and loneliness. It is normal, but also very much fixable by gradually putting yourself out there.