Wow... sounds like you're going through a lot & you have my sympathy
First off, PLEASE stop spanking. It works on kids(including my own) but simply does NOT work on dogs. All it does is scare, confuse, and anger them. They don't learn from it- they don't connect the spanking to the bad thing they just did, all they know is that mommy just hit them and it hurts. Spanking a dog is the best way to make dogs agressive or psychologically damage them. I actually tried spanking on a dog I had last year. He refused to be housetrained or obey me. He pooped everywhere as soon as my back was turned & everytime I'd open the door, he'd bolt outside & be gone for hours, terrorizing the neighborhood. Everytime he was bad, I'd spank him. You know what it accomplished? Nothing, except to make my own dog FRIGHTENED of me. Me, the one who he was supposed to be able to love & trust above all else. It was not a good feeling.
It sounds like your dog has the temperament to become aggressive, so please, stop spanking immediately. Negative reinforcement just does NOT work, and only causes more problems. With dogs, the earlier you train them, the better. Puppies are infinitely more impressionable than adult dogs, so any training(including harmful techniques) you do now sticks with them for a long time. A puppy trained with spanking and harshness will grow into a dog that is fearful, aggressive, untrusting, and ultimately- DANGEROUS.
I have a new puppy as well, around the same age as yours. I've only had her since sunday, and in 3.5 days I have taught her not to bite me. What I do is- whenever she starts play-biting, I say "Ouch!" in a yelpy tone and turn away from her for a minute, pretending to be hurt. That way she learns that biting hurts & that I won't play with her if she bites me. It's gotten to where all I have to say is "No, Zaily, don't bite" and she stops. OR- I give her her bone to chew on if she's acting nippy. Now, with your dog, it'll take longer to teach him since you've been spanking him, but he should eventually get it.
I have been doing clicker training with my dog & it seems to be working. It's so simple- all you do is buy a little $2 clicker from petsmart & just click it whenever the dog does what you want them to do. Say, if Zaily poops outside or on the training pads, I click & praise her. Just ANYTIME they do something you WANT them to do, you click & praise during the desired behavior. I don't know exactly how it works, but it does. Google it for more info.
Also- just give him time! He's still a toddler, he WILL grow out of the "terror" phase. Think of it like a much shorter version of the terrible twos. If he's just too much to handle for you right now or he makes you so mad that you spank him "really hard"- for your sake & his, give him away & get yourself an older dog that's already trained.