I've been working remotely for 2 years. What I would do is find a co-working space, where you can get out and socialize, maybe join some meetups. When I actually need to code, I go to coffee shops. These are some of the things that I did and they've helped immensely.