Hi, I think what some other people already said (wrote) is true: a loud voice only intensifies the energy both of you and your dog and the problem gets worse.
I also sometimes have this problem with my Tina. When she smells or hears a dog outside and she cannot go out to play with her/him, she starts to bark.
Then i draw her attention to something else. I say "Look, Tina, come on" in a quiet and calm voice. She comes to me, then i tell her to sit and then she gets a treat. After that the dog outside is gone and as well as the problem.
This works with many situations where your dog gets excited, angry, nervous.
Just try to get her/him out of this situation, give her/him a comand and then a treat. The best thing you can do is stay calm and do not take part in the game.

All the best for you

Michael