I am so sorry you found yourself here but please know it is a place of healing and support. When you think no one else can possibly understand, someone here does and will.
First...it's hard but breathe. Just breathe. Your world has just been rocked. You are in shock (rightfully so) and your head is swimming in 1000 directions (all VERY normal).
Please know this has NOTHING to do with you. Regardless of lack of sex, gaining weight, etc. Do not do that to yourself.
When someone has an affair it is not about what they aren't getting it is about what they aren't giving.
He gave time and attention to a LIE. He should of been talking to you.
Your husband made the conscience choice to break his vows and cheat. His choice because of his lack of self control and integrity.
Please go to the library and read the article on the 180. This may be too soon for you to even consider this but at this point your husband needs to decide what he wants. You are his wife not an option.
Is the OW married? If so, do you know the OS?
Hang in there. The ride is long and hard but you will come out the other side. I promise. You will be okay.
Don't worry about long term at this point. Take one day, one hour at a time.
Be kind to yourself.
Sending healthy hugs. Please know you are NOT alone.