How do I treat epididymitas?

Antibiotics and rest. Firstly, you need to get a urinalysis to rule out a urinary infection. Then you need to go on an effective antibiotic such as cipro, plus a non-steroidal antiinflammatory such as tylenol (acetaminophen) or Ibuprofen . Also rest up until the inflammation has settled down. Try using an ice pack to reduce the pain and try placing a towel, across your thighs to lift the scrotum. Hope you are under an md or do.
Antibiotics. Epididymitis is inflammation of the epididymis. When caused by bacteria, this is treated with antibiotics. Usually for several weeks when chronic. This condition can also be unrelated to bacterial infection (viral, idiopathic, etc) and may require long courses of antiinflammatory medications like ibuprofen. A urologist usually manages this when recurrent or persistent.