Low libido

I once had low libido and “overcame” it by being hypersexual, resulting in disturbing thoughts. I feel this happened because I did not process this incident with a therapist or otherwise in therapeutic ways. I became so miserable and so dependent on sex for the only pleasure I could count on that its absence made it worse. How do I process through this without my sexuality becoming depraved?

perhaps medications