You should have a long conversation with him. Sometime when there is no fighting already going on (don't bring it up just to support another argument - that won't deal with the problem), sit him down and talk about what you've seen and read. Apologize for reading his personal things (because they are), but you should also say that if he is writing this sorts of things to another girl, perhaps there isn't enough trust left in this relationship for things to move forward on either your part or his - you read his conversation, so he can't trust you, and he's flirting with another girl online and presumably conspiring to meet her, so you can't trust him. Ask him if this is what he wants, to be with her instead of you.
Be willing to walk out if he is uncertain. If he apologizes and says he's sorry, he was bored, it was a mistake, the relationship is getting boring, etc. then you say to him that he should come to you when he has such problems rather than seeking help from random girls online.
You can resolve this, but it depends on why he's doing it. If he seems uncertain about whether or not he wants to end things, then you should walk out. He'll realize very quickly (as in a few days) if he wants you back in his life and will try to apologize. If he doesn't, then you know you made the right choice by leaving.