A common myth is that tail wagging is a sign of happiness. Tail wagging CAN be happiness but it can also indicate F -E - A - R. It's so important to know your companion animal's body language so someone doesn't get hurt. Scared animals are the most dangerous because they're unpredictable.
Here are 3 steps you can take to help:
1) Calm yourself. Dogs are pack animals and will look to you for guidance. If your own fears are triggered, it will cause them to feel justified in their reactions.
2) Take their leash and back up from the situation As far as you need to until your dog will make eye contact with your when you are speaking with them. Sometimes this is 5 steps and sometimes it is more. You will need to gauge where the 'invisible wall' is with your dog. What's important is that they make eye contact with you and when they do, reward them with praise and/or a treat.
3) Explain to them they are safe and that you want them to remain calm. Dogs (all animals) are telepathic and will be able to understand what you're saying by reading the image in your head. If you can keep your images in the PAWsitive *ahem* positive and as clear as possible, they will understand what you're asking.