I’ve worked from home as a freelance software dude for over 20 years now. Everyone always asked me how I could handle being alone so long and also not just sit on the couch and watch TV all day. I tried to get out for lunch a lot and became friends with many of the servers around my area. Plus I had pets at least too. Discipline helped me stay focused on work. I got asked how to do it so many times I eventually just wrote a book on freelancing and told them to go buy it lol. As far as issue you mentioned, I think you can also become jaded from having bad people around you at work just as being alone can cause the reverse issue. I will say though, working alone has at times made it harder to make friends. Especially before sites like Meetup existed to create events. Untimely you make your own heaven or hell and how you handle them.