Epididymitis treatment often includes medicines called antibiotics that clear up infections caused by bacteria. It also can help to rest, wear an athletic supporter, apply ice packs wrapped in a towel and take pain medicine bought without a prescription. Sometimes, surgery is needed.