I agree with everything you say, it sounds like he is addicted to gambling and porn. And you cannot fix the marriage without dealing with the underlying problems first. Good luck. I hope you are working on saving yourself too, that is the first rule of lifesaving.