I haven't read the other replies so apologies if this is a repeated message. You haven't mentioned how this person is related to you. If he is a boyfriend then seek repentance and thank Allah SWT for saving you from continuing a haram relationship and being hurt more further down the line.
If he is your husband then firstly I would like to say is alhamdulillah. A man like him would never have been faithful to you or treated you rightfully and you should find peace in the fact that his true nature has been revealed to you.
If he is your husband then know that this is a test from Allah SWT and He SWT never burdens a soul greater than it can bear. This is a test of your imaan, stay strong, find solace in His remembrance and seek professional help too. Some people enter our lives as a blessing, whereas others come to teach us something and leave. It really isn't the end of the world, He is the Best of Planners and he has something great for you coming. In Sha Allah you will see that soon.