I've been working remotely for about 5 years and the first two were like this.
When I realized how unhappy it made me I made a conscious effort to stop.
I set an alarm at 6pm and when it rang I'd stop working.
The most difficult part was stopping to feel guilty when someone contacts you after hours. But after a while I managed to get over that as well.
It was practice, that's all. It got easier after a while.
There were two things that helped quite a lot (besides that I worked for decent people the entire time)
First, I told a few people who would contact me after hours frequently thay I wouldn't reply after office hours but that they're free to contact me and I'd get back to them first thing. And I always did. I also told them not to call unless shit is on fire. When they did call if things were on fire I'd fix them immediately, but if they weren't I'd repeat to not call me and told them I'd handle it tomorrow.
Second was to make a dedicated work area. In the beginning I was in a small shared apartment and the desk was next to my bed. After I'd moved to a bigger place I had a spot in the living room made up as my "office". I'd not use that space for anything else. It was just the corner where there desk and the chair were but I'd not sit at the desk or use that chair other than while at work.
I'd guess it took about a six months for this to be normal but it survived changing jobs.
When I realized how unhappy it made me I made a conscious effort to stop.
I set an alarm at 6pm and when it rang I'd stop working.
The most difficult part was stopping to feel guilty when someone contacts you after hours. But after a while I managed to get over that as well.
It was practice, that's all. It got easier after a while.
There were two things that helped quite a lot (besides that I worked for decent people the entire time)
First, I told a few people who would contact me after hours frequently thay I wouldn't reply after office hours but that they're free to contact me and I'd get back to them first thing. And I always did. I also told them not to call unless shit is on fire. When they did call if things were on fire I'd fix them immediately, but if they weren't I'd repeat to not call me and told them I'd handle it tomorrow.
Second was to make a dedicated work area. In the beginning I was in a small shared apartment and the desk was next to my bed. After I'd moved to a bigger place I had a spot in the living room made up as my "office". I'd not use that space for anything else. It was just the corner where there desk and the chair were but I'd not sit at the desk or use that chair other than while at work.
I'd guess it took about a six months for this to be normal but it survived changing jobs.