Good question, last time i was reading an article on this stuff, making a ritual before playing poker is a key for success, for exemple you have to sleep 8h, do some exercise in the morning, have an equilibred meal (eating carbohidrate and protein) do some poker puzzle to warm up your brain like in sports.
now if you feel tired before your session don't play
if you feel that you're in a bad shame don't play
you can evaluate yourself by givin a mark from 1 to 10
for exemple : 4 < STOP don't play. [5-7] it's okay > 8 go ahead
hope it helped a bit