-What is your question for me?
-How long have you been married?
-Do you want to save the marriage?
-What did your pastor advise you to do?
Your pastor is [artially right, it's important to give your husband time to cool down from being angry about you talking to the pastor, he is feeling embarrassed as do most people with a sex addiction or addiction to porn, they deny it even to their wives and others because they are ashamed of having the problem. All of your underlying issues in your marriage sound like a classic signs of addictions but it seems he may have several addictions to spending and porn and trying to hide them both and often times they get defensive and mean about denying it to the end. Sex addiction can be managed with a support group and therapy or talking to your clergyman, in the grips of this addiction the sufferers cannot escape their obsessive and compulsive behavior. Often times sex addiction is experienced with other addictive behaviors such as over spending and drug addiction, they are all behaviors of the same disease of addiction.
The addiction is similar to other addictions such as drug addiction and alcohol addiction, sex addiction is based on obsessive and compulsive needs. The behavior of a sex addict can include, compulsive masturbation, denying they have an issues, trying to take attention away from the issue with another issues, trying to place the blame away from himself and putting it back on you. Just like with any addiction with therapy and a support group for people going through the same things as you husband he can regain a normal life again. Many sex addicts will be in a state of denial about their problem but once they have admitted that they have a problem, they can begin the healingand recovery process.
Treatment usually involves group therapy and individual therapy which have been found to be the most successful methods of dealing with sex addiction. He doesn't have to be alone in his struggle, if he can only see that he is not alone and that he has a problem but he has to want to get help you telling him that he needs help will not make him go, that is where the pastor can help you to convince him that he needs help. You are going to have to have the patience of Job right now and be his biggest supporter during this ordeal if he see that you are on his side instead of against him it will make your marriage stronger and healthier.
Yes and the irrational behavior stem from embarrassment and shame from the addiction both to spending and porn sites. Talk to your pastor again and see what he says and also show him or talk to him about what I said and see if he agrees.