Bacteria in sperm?

Hi guys, I have a big problem and have been panicking for days. 5 months ago I had pain in the testicle area and groin It was a very strange pain. I didn't have it all the time, but every now and then it was there and it pulled and throbbed, such a strange feeling….