The first thing to realise is that you are going through a grief process. No matter whether you had seen it coming, but hoped you were wrong, or if it comes totally out of the blue, your system needs time and space to adjust.
It is vitally important in those first days and weeks to allow yourself 'space' to acknowledge the hurt, and the array of different feelings that those words have brought up in you. They won't be the same for everyone, but they are likely to include anger, disappointment, relief that it has come to a head, guilt, and jealousy.
The feelings are normal - let yourself experience them, preferably without voicing them to your other half.
You can then decide on your wishes and hopes for the future. If these revolve round winning back the love you appear to have lost, then the ebook The Magic of Making Up could be a life-saver for you.
Here is a video by the writer, and you can see for yourself whether he knows what he is talking about!