Is your dog well behaved when you are home but acts out when he cannot be with you? The acting out includes destructive behaviour, excessive barking, excessive coat licking, eliminating indoors, loss of appetite and depression. Often your dog has been fine for years but then a change in your lifestyle causes your dog to suddenly act out. Dogs suffer from separation anxiety because they like to be part of a pack and this explains why cats do not suffer from this problem.
Punishment makes the problem worse as your dog will associate your absence and return with punishment. Your dog will become more anxious and submissive.
You need to teach your dog that you will come back. Practice "sit and stay" while you are moving around your house. Use treats as a reward and slowly increase the time and distance. Next you need to change your leaving routine as your dog associates your preparations (picking up your keys or your bag) with his destructive behaviour. Think about doing something different from your normal routine. Start doing practice departures and when you come back avoid a big greeting. Gradually increase the amount of time before you return. If your dog becomes upset then reduce the time again. There are medications available which can relieve some of your dog's anxiety and so making the new behaviour easier to learn. These medications can be stopped once the new behaviour is learned.
Another option is to take your dog for a walk before you leave. Your dog will be tired when you leave so more likely to sleep and your dog will look forward to the walk which happens when you leave.
Our vets will be able to give you more suggestions or refer you and your dog to a behavioural specialist if necessary.