You are aware that this is not a good thing, so I would see it is as a matter of willpower.
Try to put it on pride. Think of it as a chess game against your urge. Does your will let itself be beaten by this urge ? Prove that you are stronger, impose yourself and win !
Otherwise, if you can't stop when you want, it's called addiction... I would avoid getting to that point, as long as possible.
Hello, I am having an issue with my chess playing right now where even if I lost 2-3 times, I get this urge to continue playing, even though I am aware of the dangers of continuing to play while exhausted, it doesn't seem to scare me off and my urge to continue playing is still strong and futile, how do I overcome this?