It definitely takes getting used to. I've been exclusively WFH for 8 years now and it's hard to imagine going back at this point, but it took a while to develop that groove.
My first job out of college, my boss actually told me "Don't miss meetings, don't miss deadlines and I don't care when you're here." About 3 weeks in I was dying to go to the office and just stayed there all the time.
In order to make WFH work for me now a few things had to fall into place:
1. My wife got so busy with her business that she has no free time to deal with anything at the house during the day, so any random person that needs to come by (contractors, cable repair, etc) I'm already here for. Additionally, most days I can use my lunch break for any errands that need to be run without it interfering with my after work hours.
2. I have 2 dogs that keep me company.
3. I've found other friends of mine who work from home or are up for grabbing lunch in the area. I tend to meet somebody out for lunch at least once a week.
4. I keep a TV on in the background, out of sight (usually the weather channel). I don't know why, but it makes the house feel less empty all day.
5. Facebook and some relevant community message boards (Clemson sports, local programmers Slack). Just need some type of social outlet.