Separation anxiety is a serious issue. The behavior problem arises much more often in a second hand dog than in a first home dog. A second hand dog being one that had a previous life before you; no matter where their first life was. It can be so serious that great care must be taken to confine the dog. I have known dogs who jumped out of glass windows, scaled huge fences, ate through drywall to get to the outside and chewed through doors. So where exactly are they going?
They are in search of their pack leader, you. It is a very sad way for a dog to live and one that can be very difficult to rectify when it is at the worst.
Here is a link with lots of info on the subject.
The first thing to understand is that your dog is not being rebelious, resentful or vengeful. It is all about your absence; your dog wants you around. So it is quite flattering although it can be a very bad situation. Anger should never be a part of working with an anxious dog; this makes matters much worse.
You have to take it very slowly, I mean several seconds at a time. Adding more mental stimulation and physical activity can definitely help. An over active energy level or bored mind can wreak havoc on a dog.
So read up on positive methods of working with separation anxiety, be patient and understanding; this is very rough on your dog.