I think it's very important to watch and follow your psychological health and emotional condition overall, and how it's changing due to poker. It's preferable to have some warming-up routine before sessions, where one of the steps will be an evaluation of the current psychological state the player is in. Whether you're ready to play or not, whether you're motivated, rested, prepared, what's going on in your mind and whether it's ready to be thinking strictly about poker for a while. This will help to not get into a session unprepared and unmotivated, when you're bored or unenthusiastic.
If we're talking about poker in general, well, just don't play if you're unmotivated. But being unmotivated for prolonged periods of time may be caused by unbalanced approach to playing poker, high expectations and also it can be a form of tilt.