Duv1, it sounds like you were going to leave your family for your affair partner and then had a change of heart when she found the emails. Your wife and your son are justifiably angry at you.
Someone said that this should be kept between you and your wife exclusively, but I think we all know what happens in a marriage does not happen in a vacuum. You cheated on the whole family when you took up with this woman, not just your wife. (Sorry, but if you don’t want your older children to know you are a cheater, don’t cheat. End of story.) You destroyed the stability of the household and everyone is reacting in a normal, understandable way. It is a fresh betrayal. Give them time to process and grieve what was lost here.
You feeling terrible is actually the most hopeful thing about the situation and one of the best signs to your family that you won’t do this again. You are owning the wrong that you did to them and really feeling it. That is good! It shows you are taking accountability.
The next step is to work on the defects in your character and/or marriage that led you to have an affair in the first place. You will need to do counseling and then show real, concrete improvements on yourself so your family can see that you are willing to atone.
Some examples: Give your wife access/ passwords to everything. Cut off all ties with other women. Shower your wife with kindness and affection in ways that she will accept. Cut her lawn. Pull her weeds. Pick up her leaves. When it snows, shovel her driveway and clear her car. Leave her presents and flowers on her doorstep. Show up to his sport events/ activities. Write letters about your cherished memories with her and your family and leave those on the doorstep, too. Do these things without expectation of them returning a favor to you. Just “love bomb” them in ways that you know will mean a lot to them. This will help rebuild trust, over time.
It’s not going to happen overnight. You are going to be shunned and feeling like the loneliest man in the world for a while, but that is also how your wife and son feel. In a weird way, you are not alone in your loneliness!
They will reject you for some time because you have been rejecting them and finding your fulfillment elsewhere. Sorry, that is the cost of cheating. Your job is to keep showing your love and faithfulness, even if they aren’t showing it back to you. Do this for as long as it takes. They are enraged right now but deep down, they want to forgive you and they love you back. Don’t give up! There is hope! If you do the work and show your love with real acts of service and are completely open, I give it 6 months before they let you back in the family.
I wish you the best!