Harsh methods of discipline, such as yelling at or hitting your pooch, aren't constructive, only serving to scare your pup, breaking your trust with him. If the relationship with your dog has become negatively affected by either your actions or aggressive behavior on your dog's part, work with him to rebuild the trust between you. Keep interactions positive and gentle, using rewards and obedience training to encourage your pup to bond with you -- and behave.
Sit quietly in a room with your pooch. Don't force any interactions with Fido, instead letting him come to you. Anytime he comes over and sits calmly near you, give him some delicious treats to reward him. Ignore any unwanted behaviors such as fearfulness, aggression or shyness. Repeat this daily for at least 15 minutes at a time. Eventually, you can just reward him when he moves closer to you, eventually happily sitting next to, or in, your lap.
Engage your pooch in a game that he enjoys, such as fetch, with his favorite toys. If, during the game, he attempts to nip or growl at you, immediately stop playing and leave the room to give Fido a "time out" of two to three minutes. Not only does this teach your pup that aggressive behavior is undesirable, it also allows you to calm down so you don't snap at your pup, negatively affecting your relationship.
Teach your dog basic obedience commands using positive reinforcement techniques. Do this in sessions of 15 minutes at a time, rewarding your pup with treats and praise when he performs a desired behavior. You can also enroll him in an obedience class with an instructor who uses positive training techniques. Learning obedience makes your dog polite and well-behaved, so you'll feel more comfortable around him. When a dog learns obedience commands, it also boosts his confidence level around you and helps you to gain his trust, recommends 2ndchance.info.
Feed all of your dog's meals to him by hand. Crouch down to his level and hold out the food in the palm of your hand, avoiding eye contact with him, suggests the Best Friends Animal Society. If he's very fearful, place the food down in front of him at first, slowly working him up to eating directly from your hand. This type of feeding helps build your pup's trust back up with you, while also strengthening your bond with him.