Welcome to HCM
We understand your concerns
I went through your details. I suggest you not to worry much. Please do not over react. I don't think that the thign pain has to do something with your masturbation
problem. But to have a proper diagnosis of your condition you should consult a physician immediately if you are that much troubled by that pain. Consider anxiety
and other contusion
that might be reason.
If anxiety is the cause, then I shall be of help. Please post a direct question to me in this website. Make sure that you include every minute details possible. I shall prescribe some Sexology related psychotherapy
techniques which should help you cure your condition.
Hope this answers your query. Available for further clarifications.