Yes, of course there is hope. But it takes certain behaviors to make that happen and even though a marriage can survive without those, you will never feel secure without them.
If you make it clear that you are staying, no matter what, then she will continue in the fog.
You are blaming yourself for the affair because of intimcy problems. That is NOT an excuse for an affair.
She should have discussed her unhappiness with you and tried to work though it with you. If she couldn't, then she should have gotten a divorce, not subject you to a devastating betryal.
She needs to be making you feel loved and needed, much more important than her affair partner. Security comes from trust, and not neccessarily trust that they won't re-offend, but trust that they really want us. That is the hardests.
But weakness and allowing them to not make us feel secure is not going to conclude in a happy marriage.
Us showing strength, making it very clear that we are not to be treated as the default, standing up for ourselves, and the very clear message that we WILL leave if they are not fully committed to US, can and often does result it a stronger and happier marriage. Good luck, and remember, YOU DID NOT CAUSE THIS TO HAPPEN, period!