Tilt happens any time your mental or emotional state leads you to act in ways you normally would not. So, any time you're in a state where your mental or emotional state is likely to undermine your ability to play your normal game, you should stop.
The sooner the better, which includes that it's better to stop when you recognize you're likely to tilt rather than waiting until after it happens.
And the best solution is hard. It's not what is usually suggested, which is to stop for a while until you're back on an even keel. It's developing your self-discipline so you don't react as easily or as much.