I can't tell if your marriage has always been loveless, sexless, and devoid of affection or if this is a decline over time. If the latter, did you and your husband ever talk, pre-affair, about how things were going wrong, or discuss the possibility of either getting therapy/working to improve things or splitting up?
Decide if you want your marriage to be something different - e.g. if it was once happy/loving, and you'd like to try to get back to that. If YES, that's really only an option if your husband also strongly and genuinely wants that and you're both willing to do a LOT of work - including ending the affair, cutting contact with your affair partner, being completely transparent until trust is restored, probably going to therapy, taking it seriously, and having a LOT of tedious and irritating conversations about the relationship.
If NO, do you both want to remain in the marriage but treat it as a business arrangement, or a living arrangement, or coparenting or whatever - which sounds like what you were doing before the affair started? If so, you probably both need to agree on ground rules about things like outside sexual/romantic relationships and what to tell other people, most importantly your children.
Or do you want to split up? Have a conversation about next steps - who moves out, if anyone. How assets get split up. What happens with the children. How do you tell people. You get the idea. But - especially if you have combined finances and especially if things have been unequal between you financially - you should probably seek legal advice before discussing this with him.
Things will probably fall into place with friends and family once it's clear what's going to happen going forward. His family and friends may continue to be cold to you, and many will simply judge based on the fact that an affair happened. But with your own friends and family it's worth trying to explain what has happened once you understand it yourself and you and your husband have decided what's next - "I'm leaving Trevor for Cletus; we're madly in love and it's made me realise that my marriage has been essentially over for a long time" or "Trevor and I have been through a really rough time and a lot of it's my fault, but we're trying to work things out and a make a fresh start" are a lot easier for people to respond to than "I'm having an affair with Cletus, LOL! Trevor knows but won't discuss things so we're just all doing what the fuck we want".
You've got to be the one to take the first steps to fix this; no one else can do it for you. Good luck.