Oh I'm so sorry to read your post. Three years is a long time to have been doing this, and it's not just the sex, it's the deceit involved and trust that has been lost.
You are in shock at the moment, so nothing will make sense until you give yourself some time to think.
It may be possible to forgive and carry on, but I guess that's whether you CAN forgive. He may never do it again, but then he may well start again once the dust has settled.
I wish I could write some words to take away the hurt you must be feeling right now, but I know they will not do.
What you can be sure of is that you are welcome to friendship on here and, if you feel a connection with any of us, you can also send us private messages if you feel it would help. This includes me.
Treat yourself with love and compassion, and give yourself the chance and space to think about what you really want. The future has not yet happened, so concentrate on the today and take each day as it comes.
Taking up Yoga, Tai Chi or a meditation class can help to create a sense of calmness in the storm. Have a look if there are any classes you could attend or, if not, perhaps a DVD might be worth getting.
I wish you well, and hope that you will be able to come through this. xx