I'm sorry he took it upon himself to go into your bedroom. Now that he's done that, time to put a password on your computer. It's unfortunate that you can't trust him to do the right thing and stay in the other parts of the house, but he'll have to have some boundaries. BTW, I'm not surprised that he spewed because he was caught doing something he knew he shouldn't have been doing. Don't respond to his messages. Just leave him to be by himself and fight that internal battle. Eventually the fire will die down and he'll get back to being the calmer version of his childish self.
If you need to enforce your boundaries...do it. He'll either honor them or he will have to face the consequences of not being allowed to come to your home unless you are there.
Sit quietly, the answers will reveal themselves when you least expect them to. The past is gone, the present is a gift and you need to focus on today, allow the future to reveal itself when it is ready.