Well, that's not the best discipline method or teaching method with your pup and you feel bad. Move on. Don't make it a habit or your dog will learn to fear you rather than trust you. Instead, reward. Teach by the tone of your voice. Dogs are very receptive to that. I made a tsk tsk tsk noise to my dog and a firm NO and my dog would back right up. But for things you don't catch at the moment, you have to think ahead of time. Dog chews shoes when alone then problem solve. Close closet door and put shoes up when you leave. But in reality, a pup of 3 moths can't be trusted so I always kenneled my pups during their first year. This was for their own safety to make sure they didn't do anything dangerous to themselves (chew a wire?). One thing for when a dog bites that sounds silly but seems to really work is if you are playing, dog nips -- you make a sound like a crying dog and stop playing with them. They know that sound (and will understand they hurt you) and they learn the consequence, they will be ignored or not played with if they do that. Most dogs learn bit inhibition but it takes time to understand the okay level of pressure of putting teeth on you.
But definitely do not lose your cool and hit your dog. Deep breaths and understand that a lot of what a puppy does is natural puppy behavior as they learn OR something related to something that we as owners didn't do in our job of caring for them. good luck