Hi, porn addiction and repetitive negative thoughts and feelings about sex can be due to depression, anxiety,OCD,PTSD,etc. Consult a psychologist for psychological evaluation and further therapy sessions .
Next Steps
CBT
Exposure and response prevention
Behavioural therapy etc are some techniques used to treat addiction and OCD
Health Tips
Self care techniques like exercises,yoga, maintaining journal about your anxiety trigger,etc will help you