Medicine for a divorced male

Patient: I’ve been divorced for a year after a financial disaster. I’m suffering with some kind of obsession with the sexual thinking most of the time. I tried to avoid by engaging in work but when I struggle it attacks me again. In our society we can not have sex without married relationship ( sex workers are not safe). And I tried masturbation but it made me more depressed and away from my work. This problem have increase a huge procrastination me which I never had. And the more obsessed I get the more weak I’m being. Currently I sleep for 18 hours just get away from this.Is there any medication that can bring me to life? If I’m financially capable(it depends on my work), I will be able to marry again.