Actually he does not know he is not supposed to bark, he looks guilty because he sees your body language and hears your tone of voice. It does not mean he associates that with barking. This is a natural part of being a dog.
It seems you have gone the route of punishment so to speak for his barking rather than show him what you would like him to do and build on that behavior. Negative punishment, shock collars, loud noise, etc. only interrupts the dog's behavior but you are not giving him a command to obey instead which tells him what you want. Negative punishment on a dog that is already anxious really has no place in his life and can make matters worse. It is much like that human saying, violence begets violence. So over time the dog gets worse instead of better.
I would like to see you teach the dog the difference between speak and quiet so you can eventually give a quiet command and reward him for that behavior. The more good behavior you reward the more likely you are going to see it.
Right now it sounds like the dog is in a trap, has a learned behavior which has to be unlearned which will not happen over night. I am surprised that the trainer went the route that they did knowing this dog has anxiety.
At this point you have nothing to loose by trying a new way.
I am going to direct you to a site for clicker training and I would like you to do this in short sessions but do it several times a day. Dogs that are anxious need to be shown consistency by the owner, as well when you train positively you set the dog up to succeed and this builds confidence and reduces anxiety.
I will also direct you to links that show how to teach speak and quiet.
Medications alone will never do the trick, both positive training /counter conditioning and medication have to work together:)
Clicker training/positive method training/ print off
video’s to see how clicker training is done, scroll down to videos http://www.clickertrainusa.com/clicker-training-videos.htm
clicker maintaining focus http://www.clickertraining.com/files/auto-eye-contact.pdf
Speak & Quiet