I am sorry you are going through this. It is very real. The betrayal is real the pain is real. But this is not the end. There is hope. If you are willing to wait a little with the right help you could see a turn around from your spouse. I will not lie to you. The path is not short. Sorry that is the truth. So that it put your mind at peace, you did not create this. Your spouse likely has been struggling with this since the early teens. I wish I can tell you that it is a straight line, today always better than yesterday. That is not true. Your spouse is not a computer and this will be a learning curve.
Like cleaning the closet, one needs to pull everything out, create a temporary mess so that the right things are placed back in their right place and those that do not belong are thrown away. Like cleaning an infected wound many times it require to open it again to remove the puss and clean and disinfect and yes it hurts.
Your spouse will need to create new habits and this is difficult. He has tried before to stop his behavior and was not able to do it. This could be different now. I know you may be tempted to ask about ALL the stuff that he has been doing. I have to tell you that your spouse has lied so much to cover his tracks that he is unaware of what is real. I am sorry, this is called self deception. He will need at least 6 months of sobriety to know what is the truth and accept responsibility. This is not a matter of will power or “just do it”. He needs a level of healing to accept the consequences of his own actions.
In the resource page there is information of material that is beneficial for you. You need to understand what happened to him, what is happening to you and how to move forward. My advise is not to make live changing decisions during the first two years after the discovery. Those would be emotional decisions rather than thoughtful ones. You can also walk your path of healing and recover what has been lost.