Take the dog for a good long walk before you leave! 20 minutes at least play with him and when you get back give him a reward! The reward may be another walk if thats what he likes! This may take a lil time but you are in a tight spot with a dog in an apartment! You have to put the time in with a dog, make him feel fullfilled and not just fawned on but exersize him and work on training him
to make him feel part of whats going on !