Leaving yourself a clear idea of what is next to do would be similarly effective IMHO. Finish the task you are on then open up the next task, maybe open up the right file in your editor then log off for the evening.
What I dislike is when I'm stumped, puzzling over a bug or the correct implementation for a complicated feature. It's not always possible to resolve these situations by the end of the work day and they tend to nag at me through the evening. I don't like that and try to avoid it, rather than deliberately create this feeling ("leave things undone") as some sort of trick for motivation.