There is a good chance of success for the two of you, if your husband accepts responsibility for what he has done and if the two of you are willing to work hard on improving your marriage.
If there is an emergency, you should contact your local law enforcement agency.
Bad feedback system helps stop SPIM (instant message spam).
You might benefit from going to counselling especially if you feel traumatised and need to the help of an impartial listener to process some of the feelings.
To move forward, it is important that you continue to talk to your husband and try to understand the extent of his difficulties and what the underlying issues are for him.
However, creating this intimacy is hard work and much harder than the easy escapism of the internet or watching TV or even over-working or domestic chores.