If you have not masturbated for 2 months, I'm assuming you're telling the truth, perhaps you have discomfort because you play with your penis without going all the way to ejaculation. That can cause discomfort too. It's called teasing the penis.
But anyway, in this case, releasing the ejaculation just this one time will probably alleviate the discomfort in your testicles. Go ahead and give it a wank but stay away from porn.
But I am not masturbating from past couple of months, since I don't see any interest. Still I feel slight pain in my testicle. Also I feel as if my penis is dead. I am really worried since my marriage is getting fixed soon. Are there any tests to make sure I am fit for married life. Please help
Yes it is possible you may be feeling discomfort in the testicles from over-masturbation. If you release ejaculation, and nothing is barely coming out because you already let most of it out from the earlier ejaucalation, yes that can make the testicles feel discomfort.
If this is the problem, I suggest you stay away from masturbation for a couple weeks to see if the discomfort goes away.
If the discomfort does go away and then you start masturbating again and the discomfort comes back, then you know that's the problem.
As far as your interest for sex, your constant masturbation could be keeping your sex libido very low.
Just stay away from masturbation for right now or space it out to doing it once every 2 weeks or something like that.