I recently did a behavior consult with someone who just adopted a puppy from the rescue I work with. The dog has some issues with being left alone. One of the points I really stressed is to make leaving and coming back very low key, even to the point of ignoring the dog apart from a "see ya later". The farewell should be very basic and dull, but the dog should be left with some kind of special treat to enjoy while alone.
The day after the consult I needed to leave BabyBug with my mom. Whenever I leave Bug with a sitter I make goofy faces, dance around waving bye-bye, blow kisses, generally make a fool out of myself. I started doing this the first time I left Bug with my aunt and Bug was a bit alarmed to be left. My aunt was about ready to slug me when I started playing and hiding and popping out again to say "bye bye!", but pretty soon Bug was lauging. Once she was happy I left and she was fine for the evening.
Now, I do know that dogs and children are different creatures, but why does the "bye-bye" game work for Bug and not for my dogs? Why do my dogs prefer that I leave with a "see ya" and a treat while Bug gets upset if that's all I do? After much thought, it became clear - in both cases I've made my leaving a ritual to look forward to. If the dogs only get stuffed Kongs when I leave, then hey, don't let the door hit me on the way out! And Bug gets to play a bit of peek-a-boo, hang out outside for a bit, and show off her waving and kiss-blowing skills when I leave. What constitutes "fun" is different for different creatures, but it's important that being left by the primary caregiver is a fun event and not something to dread.
One other thing that seems to be the same for both dogs and children is to make it known that you're leaving, rather than sneaking off. If you make a habit of sneaking off and then disappearing, you will never be able to go anywhere alone again. Neither dogs nor babies will want to risk you leaving the room for fear that you'll go "poof" - and if you try you'll probably wind up with some screaming.