- separate space that is work only (ideally even a co-working space, but there's no decent one available where I live)
- establishing with SO that when I'm in that space, I'm "not home"
- have fixed working hours as consistently as possible (besides making your availability more predictable to others, this also helps on other fronts, like:)
- work slack and gmail notifications set to on only during work hours, _automatically_ off after
- set working hours in google calendar (others get a warning if they schedule outside those hours)
- mark lunch in google calendar
- when "at work", focus only on work, but when work is done, close everything asap -- even if in the middle of something (it might feel like a waste if you're in the zone, but you pay it the next day if you stay late) -- this was hard to get into, especially the guilt part, but going outside immediately e.g. for a walk/cycling, or something that needs some focus from your part, helped with that
- although my workstation runs 24/7, I open/close all work related programs (IDE, slack, etc) when "arriving" and "leaving" work, it seems to help the mind cope better with the lack of a physical commute
And as a side-note, choosing a company that is 100% remote makes all that at least an order of magnitude easier because people can relate to what you're going through (bonus points if they also have a life outside work)