This is not entirely something that you have to work on alone. He is responsible for his behavior and treatment towards you.
Different things could be going on with him leading to his behavior. Some speculations- porn addiction, mid life crisis, depression, he may have had these tendencies in the past but was either hiding it or you were not completely aware the extent to which he's acting out. Regardless of the causes for his behavior, he is responsible and should he agree to work on this issue, he can manage it. The red flag is that he is refusing to work on the issue. Marital therapy as well as working with someone who specializes in porn addiction would be needed. He must be willing to address the issue and to work on improving the relationship. It is unfair for him to expect you to just accept his behavior and deal with it.
You can decide to do what works best for you even if it is giving him an ultimatum and doing what is healthy for you. You have to accept that no matter what you do or say, it is his decision to act this way. You are not responsible for that and if he ever eludes to that, he's using a cope out. He also has to respect you when you tell him how his behavior is affecting you. From what you've shared, he is not all too responsive to you.