So you have a slip-up and your dog snarks, barks, and air-snaps. You lose your cool and you holler "knock it off!" and immediately you tuck your own tail and look remorseful. You know you've slipped up.
Hopefully there hasn't been an escalation leading to the ingestion of a dangerous item or a bite, but if there has, you have to jump into management mode and put safety first. Get distance, tend to the wound or contact your vet, and decompress.
As with any setback, we have to acknowledge that it happened (don't just move on with your day-to-day like nothing happened) and create a plan of action to patch it up.
Your dog will have suffered a breach of trust (as have you) and so we go back a few steps and rebuild that trust using the same plan we're working on. Your dog's body language will tell you where their current threshold lies. If you had worked up to approaching to 5 feet and tossing food and then had your setback, you might be back to 7-8 feet again after this, so you go back there.
Dogs are generally forgiving, but if the setback was really stressful for them, you might see more stress signals or avoidance in their body language for a little while. Take note and be cautious.
You've got this!