You shouldn’t be leaving Mr Doggo alone for more than about 4 hours. This is because they are pack animals, and need the company of others – this doesn’t mean that if you have more than one dog you can leave them for longer, as the company of humans provides them with a lot more stimulation.
There are, however, ways to fill these hours with fun for your dog rather than boredom, barking, and possibly protest peeing… First, and simplest, is to leave either the TV or the radio on. Some dogs actually watch TV (I’m sure you’ve noticed if yours has – and they will get enjoyment from it even if you aren’t there), but other than that the noise of people talking will often calm a dog and make them think they aren’t alone in the house (at least for a short period).
You could also try leaving your dog with a Kong or activity ball with treats in it. My boys never managed to work the activity ball out unfortunately (doh), but they like it when I put some raw meat in their Kongs and put them in the freezer – it takes them ages to get all the meat out, and it’s perfectly healthy and keeps them entertained for a fair while. NEVER leave your dog alone with any bones as they may choke.
There are more and more fancy toys coming out that keep your dog entertained without you – like the tennis ball dispenser… though you may end up with a load of smashed ornaments on your return…
If you do have to leave your dog for long periods of time, make sure you walk them first – that way at least their time alone will be ‘rest time’ and hopefully by the time you’re back they won’t be up to anything naughty!
If you're struggling with leaving your dog at all because they're barking when you go out, you could try crating them - less room tends to reduce stress as they aggravate themselves more by pacing and running around. It also can help to reduce their visibility so they have less visual stimulation so you could try shutting the curtains before you leave. Leaving the TV/ radio on can be a good trick for anxious dogs as the noise helps to calm them.
As always, let me know if you have any questions!