Had pretty severe depression a few years ago. Never talked to anyone about it specifically or almost anything even remotely related in general for various reasons, and while I'm doing a hell of a lot better these days, I'm still not quite back to the way I was and am not sure if I ever will be. I hope I will.
I have had various mental issues over the years.....some that seemed insurmountable at the time.
My advice? Find/maintain a good support network(family/friends/etc)....it can make all the difference sometimes.
Yeah, lack of friends was a major part of the issue. Moved to another city, but kept working from home in my previous job because it paid the bills, and bills there were aplenty (higher living expenses, ageing and ailing pet, the expense of moving), so there weren't many options in that respect. Tried a few hobbies, but turns out that everyone was eager to just get in there, do whatever it was that were there to do, and then skedaddle as quickly as possible because it took forever to get anywhere in that city. No mingling around, and even if there was, it's pretty difficult to strike up conversation when you're depressed and nothing's happening in your life.
So we moved back some years ago and it's been better. Trying to look after myself better now, and while it's a balancing act at times, it's better than a slippery slope.