One definition of separation anxiety is disruptive behavior that occurs when a dog is left alone as a distress response to separation from the person or persons to whom it is attached. The key to the diagnosis of separation anxiety is that the behavior only occurs during the absence of the owner. Some feel that separation anxiety results from a dog's complete inability to cope with being left on it's own which may stem from a lack of self-confidence on the dog's part.
Punishment has no place in the treatment of separation anxiety.
In fact, punishment delivered by the owner may actually increase the dog's separation anxiety by making the dog anxious about the owner's return or departure. Anxiety behaviors are not the result of disobedience but are a distress response. The dog may exhibit predeparture anxiety by pacing, panting or trembling. Severely afflicted dogs are often so strongly attached to a specific person or persons that the presence of any other living creature doesn't matter. Separation related behaviors typically begin to occur within the first 30 minutes of the owner's departure.