How to stay in a marriage after your spouse has an emotional affair?

Do you love your spouse; simple enough. If you love them, then you need to work on fixing what went wrong that made your love look elsewhere for support. If you don't love them enough to fix whatever went wrong, then you need to let them go and work on yourself - so when the chance for love comes again you are prepared.

If you want to stay in the marriage for love, I would suggest counseling and a pledge for the two of you to learn to be more honest with each other about your needs.