I would find and make an appointment with a therapist.
It's perfectly fine to masturbate, but it sounds like for you it has turned into an addiction. I second seeing a therapist, and perhaps finding the tools to repair the lost intimacy with your wife. It sounds like you feel very ashamed of yourself sexually to begin with, which can definitely make intimacy with another person difficult. Can you talk to your wife about your shyness and sensitivity?
I don't think you're alone. Many men feel unnerved by any criticism or suggestion that they're not a satisfying partner. Communication is the key to working through this - good luck!