So, the Cesar Millan interpretation of what’s going on — the dog’s behavior when you leave and the dog’s behavior when people come to visit — is probably that your dog thinks he’s “alpha.” I’m not saying I believe in everything Cesar says, or that the “alpha dog” concept is not without controversy, but the two behaviors do sound like they mesh well with his perspective: it’s possible that your dog doesn’t think you SHOULD leave (because he’s alpha) and your dog is protecting HIS territory and HIS people when “intruders” arrive (because he’s alpha). So, if you haven’t tried any of Cesar’s techniques, you at least have a way of looking up his resolutions on his website.
I have heard of the “leaving progressively” for dogs with separation anxiety, but it does take patience. You establish a routine or command so the dog is used to hearing it and knowing youre going to leave, and then you “leave” for a minute, 5-10 times in a row, several times a day, for several days. Then you increase the time you’ve left to 2 minutes, to 5, to 10 and so on, repeating it over and over, several times a day. Dogs can’t really tell time; you’re trying to build up the associative concept that if you disappear, you will always reappear.
Now, as a dog owner, I could tell you that the aggression towards visitors is something you really have to be careful about–because you don’t want anyone getting hurt. And in that sense, you have to meet your DOG at HIS comfort level. What I mean by that is, social interaction is really a human value more than it is a dog value (yes, dogs are social and all that, but you know what I mean). For some reason, people have a hard time understanding this–like, it’s some deep tragedy if their dog doesn’t get along with others at the dog park or they can’t trust their dog around children. It’s not. You’re doing your dog a solid by not making them do those things that already bring them anxiety and aren’t really necessary for them in the long run.
Obviously visitors are somewhat different because that’s not really “elective” in your life. So, if your dog is expressing aggressive behavior, he’s uncomfortable and YOU have to figure out a way to help his comfort level. For some dogs, this may mean that you have to lock them away when people come to visit, or that you must have him on leash. For ours, we put up a baby gate so she could watch me open the door and I instructed visitors to just ignore her UNTIL she stopped barking and freaking out, and THEN we allowed her out. Once she was able to handle that, we slowly transitioned her to receiving a command (“steps!” in our case) and she’d go and sit on the staircase when someone rang the doorbell. She’s still working on listening for the release before coming to sniff at whomever’s at the door, but she’s no longer barking and growling. I’ve also had dogs that I’ve leashed to open the door and “body blocked” until they sit behind me, and THEN they get a treat and are allowed to say hello. But under no circumstances, for your guest’s sake, should you allow your dog to be lunging, barking, growling if you aren’t in direct physical control over them.