It really depends on whether he is already housebroken when you get him. In a dog that size, at 5 months he'd be on the verge of being able to go 5-6 hours without needing a potty break.
If he can hold it overnight, he can hold it while you are out for 8 hours. But he's still got a TON of energy, so it would be better to have someone come in midday to walk him.
If he is still working on housebreaking, then seriously consider hiring a dogwalker or asking a trusted friend or relative to come and walk him midday. Leave him in his crate or in a dog-proofed area of your house for his own safety. You can buy a Lixit to attach to his crate so he has water.
I agree that you don't want to leave him out in the yard alone that long. He could be stolen, abused, get heatstroke, eat something in the yard (he is teething) etc. I am not a fan of doggy doors at all, either.
If for some reason you leave him loose in the house, or in the yard, or with a doggy door-TAKE HIS COLLAR OFF. He could catch it on something and strangle himself otherwise.