I am composing this message because highest voted answer misses some very crucial parts. Similar questions are unfortunately abundant here, so I adapted another answer of mine.
Panting in cats is a sign of extreme stress. Do not approach him if he is panting.
Get some cat treats and occasionally offer him. Don't overuse this, because treats are harmful when they are consumed in large amounts.
Extend your finger to him while keeping your distance. If he smells your finger, it means he lets you touch him. This is how you ask for consent from a cat. Touch him only when he gives you explicit consent.
If he is too afraid to approach even your finger, point something to him that smells of you. It could be your glasses if you wear ones, your watch, even your mobile. This will give him an extra distance, so if he is too afraid to approach you, this can be your starting ground.
Do the lazy blinks. The meaning of lazy blinks is disputed. Some people claim they are just signs of non-aggression and some people think they are smiles by the cat. Whatever it is, animals don't close their eyes before they make an aggression, therefore it instills some trust that you will not hit your cat for the time being.
If he is willing, play with him with strings and other toys. Don't touch him unnecessarily and never pick him up. I have never seen a cat enjoying being picked up. At best, they tolerate it.
You can let him eat from your hand, provided you first point your finger to him.
Finally, while there are some ways to discipline a cat, violence is never a solution. Cats do not try to please you, therefore showing them that you are displeased does not work. Cats stick with you as long as it also suits them. If things go south for a long time, they leave. If they can physically leave, they will. If they can't leave the house, they will act distant. They might even show some signs of aggression if you approach them.
If you want to discipline a cat, the disciplining should be while he is doing the deed. You don't like him jump on the kitchen counter? You discipline him when he is on the counter, not when you realise there are wet pawprints on the counter. There is a hierarchy of steps to take when he tries to do something he is not supposed to do.
- Blow on his face.
- Spray water on his face.
- Scare him (for example with a vacuum cleaner)
- Chase him (again with a vacuum cleaner)
If he is one of the cats that is not afraid of the vacuum, you can use some other thing to cause unexpected sound to scare him. Hitting on the ground in a close vicinity of the cat (like 1 meter, or 3 feet) with a club would also scare him away.
In your special case, however, you have to give up disciplining for a long time, at least until you regain his full trust. If you jump the gun, all your effort to patch up your relationship will go to waste.