One tiny missed gear can ruin the whole mood if you let it. The flow killer is rarely the mistake itself but the clinging to it.
Accept that mistakes happen, even to the best. One long breath sets a restart. And look ahead, because the next bend is new.
Calm with yourself can be trained. In a Focus Session we work on it.