The first, and most important, thing you can do for your dog is to decrease the excitement around you leaving your home. One easy way to help with this is to not engage with your pet for 15 to 20 minutes prior to leaving. This means no talking to them, no petting, and no going outside within that time frame. Keeping everything low-key will help your dog realize that you leaving is no big deal. This also applies when you return home. You are ignoring them in a sense while letting them know you are still there in a calm and quiet way.
Secondly, rewarding your dog while they are calm is very important. This can be done in a quiet place with limited distractions when he/she is lying down or sitting. You can reward your dog in a quiet, calm manner whenever you catch them looking relaxed. Rewarding calm behaviour is the key to seeing it more often.
Also, try to give your dog other things to focus on when you're not at home. Having puzzle and reward-based toys around the house can often distract your dog enough to get over that initial departure panic, you can even hide the toys for an extra challenge. Get creative by looking on YouTube, Google and Amazon for different types of puzzle toys and even ones you can make!
All this being said, if your dog's behavior is not manageable, or if their anxiety does not decrease, please contact a veterinarian. There are plenty of other things to try, like suppliments or even medications that can help alleviate your pet's anxiety. If you have questions about your pet's anxiety, please contact your veterinarian.
Dr. Juanita Ashton, BSc, DVM, ACDBC-IAABC is a certified Canine Behavioural Consultant, and one of the owners of the Elmsdale Animal Hospital