Then don't ignore him while you're at home and as
Lunareclipse suggested, keep him in his crate when you're out or when you can't focus on him.
Poor dog got used to being alone/abandoned, you just have to connect with him in a way that'll tell him you're there for him, that'll change his attitude for sure.