I myself first took care of the porn addiction by doing all that active recovery stuff like identifying triggers, analyzing my personal history of porn and sex, managing those triggers, learning to control urges, gaining a modicum of emotional control and resilience and so on.