All members of the family should share the tasks of feeding, walking, grooming and affection, in order that no one person is the centre of your dogs’ world anymore and he has to look to several people for his daily needs.
The room your dog sleeps in at night should be the room he sleeps in when you go out and where he has his treatment. The kitchen or living room is a good choice, a room at the back of the house even better, as he cannot see people walking up and down which might make him bark.
Ignore your dog for about 30 minutes and then give him a verbal and visual signal of time out. e.g. move a plant, then place him in his room, shut the door, wait for 5 minutes initially (this must be 5 minutes of silence, with no destruction or barking). If it takes an hour to get the required silence then that is what you have to do. If you open the door when he is making a noise then you will have taught the dog that this action brings you back.
Once he has been quiet for five minutes, let the dog out, returning the plant to its original position and saying O.K. Repeat this process six or seven times a day, building up the time you can leave him until you can leave him for 30 minutes. Randomly leave him for 5, 20 or 30 minutes so that he gets used to being left for varied amounts of time. Make sure you open and close the front door whilst he is in his room, so that he does not associate the sound of doors opening and closing with you leaving.
When going out your dog should not see any of your usual signals that you are going out. e.g. putting on shoes, coat, picking up keys and brushing hair etc.
It may be helpful to leave a pair of your used socks or a tee shirt the other side of the door to the room that he is in. This can trick him into thinking that you are only the other side of the door. Make a tape of your voice talking and play it on repeat play on your machine – this to can trick him into thinking you are still in the house.
If your dog messes when you go out then get an indoor kennel, take him for a walk before you are going out, then follow the above procedure. If you are using an indoor kennel you must make this a pleasant experience for your dog. You should feed him in it, play with him in it, make sure that the bedding in it is clean and comfortable and never use the kennel as a punishment. If you are going to leave your dog for long periods then you will need to organise a dog walker.