This is a slow process so you can't expect results immediately. Some dogs never become completely cured, and the best you can hope for is a reduction in their stress levels when you leave.
Talk to Your Vet
The first step in resolving your dog separation anxiety problem is to to take your four legged best friend along to your vet for a check up. Sometimes his behavior is related to a medical condition. For example, soiling inside can be associated with a bladder or bowel infection, and if your dog is chewing himself raw when you're out, he may just have an itchy skin allergy.
Dog separation anxiety can be so severe that your dog won't let you out of his sight, even inside your home. If he is so attached to you that you can't even go to the toilet without him hot on your heels, then start with baby steps.
Use a toddler gate to keep him from following you up your hallway or into a room, and go over it for a second or two before returning. This is getting him used to tiny separations and teaches him that you will come back. As he becomes relaxed about that, then you can increase the time you are away, little by little.
Detach the Cues from Your Departure
Dogs with separation anxiety often become stressed as soon as they see the cues that you are leaving. When you put on your shoes, pick up your coat and grab your keys, they will start to show signs of anxiety. You need to separate these cues from your departure.
This means that at random times during the day, pick up your keys, wander around with them and then put them down. Put your coat on, then take it off. Do the same thing with your shoes. You're showing your dog that these cues are not a reason to become anxious.
If all is going well with these two steps, then it's time to start leaving your dog. Go out the door, close it behind you for a second then come back in. Do this several times until he is okay with you leaving. At this point you can increase the time you are out, but do this gradually and never stay out so long that he becomes stressed. Vary the times you are out so he doesn't learn to expect you.
The next step is to start doing this with all the exits from your home, including the one you usually leave through.
As you progress with this step, you'll eventually be able to go to the car and slam the door, then return home. Then, go to the car, start the engine, turn it off and come inside. You can see how you are conditioning your dog to be calm when he sees the cues that you're leaving.
Manage your Return
Your dog will be very glad to see you when you come home, and he may jump up, bark, run in circles and become really excited. It's important that you don't make a fuss of him when you first arrive.
Just walk inside in a matter-of-fact way, and put your coat and keys away. When your dog has settled down a little, you can then pat him and give him a cuddle but again, stay calm and don't over-react.
By doing this, you are making your arrival a very unexciting event, and it won't be something that your dog is desperately looking forward to.
Separation anxiety in dogs at its worst is a potentially fatal disease – many dogs are euthanize or given up to animal shelters each year because their owners just can't cope any more with their behavior.
For the best chance of resolving this condition, work with guidance from a veterinary behaviorist. This is a serious illness, and as such, is beyond the scope of most dog trainers. A specialist veterinarian can prescribe medication if needed and make sure that your dog's retraining is going according to plan. With care, the symptoms of dog separation anxiety can be reduced and your dog will be less stressed when he is on his own.