How old is your dog? I agree with separation anxiety and there is likely an element of boredom too. Both things can lead to destructive behavior. You can see if there are any trainers who specialize in behavioral issues in your area to help work through it. If you try things that are suggested here and work with a trainer without seeing an improvement, he may need to try medication eventually, especially if he’s still hurting himself.
I agree with crate training also, like
@Ravenbird said, make sure it’s not a wire crate. I’ve seen pictures of dogs who had severe anxiety escaping those and even getting injuries from it. If he’s not crate trained start introducing it by playing “crate games” and keeping things fun. Don’t put him in there for the first time and expect he’ll be fine for a few hours. Start slow. Toss a treat in there, let him get it and come out, repeat.
It’s rare for no one to be at my house, so I would purposely “separate” my puppy for about an hour while I worked (at home) each day. He’s also the type who thinks everything is edible, so if I’m not around to check up on him, he goes in the crate or a baby gated room that’s “safe.” I do think this has helped in preventing any separation anxiety! Once your dog is crate trained and his anxiety goes down a bit, I would try something like this. That way when you do have to leave the house, it won’t be such a big deal to him.
As for boredom, I would make sure to do some type of activity with him before you start working (and again if you are able to during a break). Quick training session, breakfast in a puzzle feeder, flirt pole, walk/run, etc… Make sure he is getting his needs met both mentally and physically!