Men - Confessions

I'm a 38 YO man from Los Angeles. I've been struggling with porn since I was about 7 or 8. I got saved when I was around 17 but I got closer to God within the past few months. I remember when my wife caught me twice looking @ porn on computer (even though I deleted history) I still denied it at the time. I thought it was no big deal; until I masturbated for so long I had physical problems. I always had a hunger for sex. Eventually, it caused my wife and I to drift apart. Throughout the past two years I was viewing porn on my phone without her knowing. Every time I did it I felt shame. Maybe the Holy Spirit convicted me every time and I ignored him. Now my wife and I are divorcing because she cheated on me many times. I don't view as much and I want to overcome this sin that is plaguing me for good. I need help.