I never had this problem, I finish work when my shift ends, no earlier and no later. I take no work home with me; my home is for my home life, and my work is for my work life. No employer will ever be capable of paying me enough money to sacrifice my personal time.
You just have to be willing to reset the cycle when enough is enough. Don't code on Monday mornings just to have something to debug on Tuesday afternoon! ;)