This is a very sad story indeed. I hear that you are suffering from a mental illness and I feel for you, as I too have suffered from bipolar and it is never an easy thing. I honor you for expressing this.
For your dog, you mentioned that when he would get a hold of items and not give them back to you when asked. It sounds as though he was resource guarding. This is very common in dogs. It doesn't matter to the dog how insignificant we view the object. What is important is that the dog perceives that the item is of high value. This is a very important point. We can deal with this in two ways. The first is prevention. Anything that you do not want your dog to get a hold of, simply put away in a drawer, cupboard, or behind a door. Rubbish bins should always be kept in a place that the dog cannot under any circumstances get to. I have heard way too many tales as a trainer and vet nurse of people coming home to find their dog dead in the kitchen as they go into the garbage and choked on a bone left in the bin. We cannot blame the dog for simply getting into something that smells delicious to them. It's like yelling and hitting a child who opened the cookie jar that we left on the floor. The second part of dealing with resource guarding is we do a swap with the dog. You need to find something that is very high value to your dog and that is safe to give. This could be a squeaky toy, a Kong toy filled with peanut butter, or simply an almost empty peanut butter jar. This last one is a great enrichment and can last for while. Your dog doesn't understand that a bottle cap is dangerous so there is no point saying no no no or grabbing him by the scruff of the neck. This will only tell that dog that when you come near him, he is going to feel pain. Not a good relationship builder. When your dog has, for example, a sock in his mouth, show him the peanut butter jar and get super excited. Use a high-pitched baby voice saying things like, "look what I have". It doesn't matter what words you use as dogs don't understand language, except body language and the tone of your voice. When he comes to inspect, the only way he is going to be able to get that peanut butter jar in his mouth is by dropping the other item. This is a training method and when he drops the other item, immediately say "Drop".
He is not a bad dog. The responsibility comes down to the owner. If a child is sat in front of a piano, with no training and told to play Beethoven and then gets slapped for not being able to play. That is what we do to our dogs when we have not provided the right training in a positive manner. It is human nature to use punishment (often with physical violence) when something is not done to our standard. I'm not trying at all to make you feel guilty. What I'm trying to get you to understand is that when we use punishment, we are blaming the dog for our mistakes. We need to guide our dogs and teach them, just like we do with small children. Imagine that your parents used punishment to teach you how to do everything when growing up. You would resent them, not what to go near them as it always meant you would be hurt and would probably not learn anything in the long run. Please, please, please do not slap your dog again. The only thing it teaches him is that he will receive pain when you are around.
This is why he is growling at you. He has learned that you can inflict pain on him and reacts whenever you touch him. He is anticipating pain. Dogs have several ways to tell others to go away or to leave them alone. They start off with very subtle signs that may not be picked up by humans unless you understand a dog's body language. These include looking away, licking lips, yawning when not tired, sniffing the ground, and eyes darting around. They then progress to things like backing away, turning their body away from someone or something. This progresses up to baring teeth, growling, and lunging slightly. Next is snapping or nipping. At the top of the ladder is the dreaded bite. I often hear people say that the dog bit without any warning. They always give plenty of warning. The signs above are the warning. It may have been building up over months or years, but the dog always gives warnings, we are just not trained in reading their body language to recognize it. Like humans, dogs will try methods when dealing with stressful situations that worked for them before. If you are being yelled at by someone and you walk away from that person, you feel safer and calmer, so you are more than likely to walk away the next time you are getting yelled at Dogs may do the same thing. Someone yells at them, they turn and walk away and now they are not being yelled at. They are not going to go backward and simply lick their lips as that didn't work the first time so they need to do something that is more "dramatic" for lack of a better word.
Your dog has learned that when you go to touch him, there is a high chance that he is going to be scruffed and slapped so by growling, he is telling you, "I'm warning you. Don't you hurt me or I will bite you". You NEED TO STOP PHYSICALLY PUNISHING YOUR DOG!! You will need to start again with touch. By this I mean taking the following steps:
Whenever you enter a room with the dog already there, throw some food near him. What is his body language?
You can then take a few steps toward him and throw food again towards him. Watch his body language. If he starts to show any signs given above, back off a few steps.
Once he is OK with you taking a few steps towards him, take a few more.
We are teaching him that you being around him is a good thing and results in positive things happening.
Next we want to have him come towards us. Bend down, but do not kneel down. You want to be able to move if anything bad should happen such as he lunges. I'm not saying he will but after working as a dog trainer and a vet nurse, I've seen people kneeling down and a dog throws itself at the person and that person cannot get up quickly. Offer him some food in your hand. If he seems a bit unsure, throw it to him. Do not rush these steps or any of the following steps. We are trying to build trust again.
He should start coming closer to you. Say in a baby, high-pitched voice "Good dog". Again, it doesn't matter what words you use as dogs cannot understand works, only the tone of your voice and your body language. High-pitched voices are seen as a positive thing in the doggy world.
Once your dog is eating from your hand, you can try and pat him on the shoulders only. This is a safe spot to touch wary dogs or dogs that we do not know. Again, watch his body language, if he starts to show a lot of the white in his eye, looks away, yawns, or licks his lips he is saying I'm uncomfortable. Just continue with 5 and the start of 6.
The dominance theory has been proved to be completely wrong. I know that there are many vets out there and trainers who cling to this theory as it is simple and puts the blame back on the dog. But from reading what you have written, your dog is acting out of fear and aggression. He is scared of being hurt so is trying to communicate to you in dog language that he will protect himself if he needs to. It is imperative that you build his trust again, treat him positively and NEVER USE PHYSICAL PUNISHMENT on him as this is all leading up to your dog biting or attacking you or worse, someone else.
Moving a dog to another home once they have fear aggression is passing on that responsibility to another family. It is not fair on them or your dog and is a recipe for disaster.
I hope this information helps both you and your dog. I'm not sure where you are located in the world, but I would be more than happy to offer a Skype session to talk with you further for free as I can tell that you love and care for your dog and are simply looking for the best way to deal with the situations that have arisen. Please let me know and I would be glad to offer any help I can. I am located in Sydney, Australia.