I will say, having been divorced now for 5 months, that seems like it will be easier to "work things out" in a marriage, than to start over.
You may have shut that door by having an affair. Consider this, if you will cheat on your wife, will your mistress ever be able to fully trust you?
Also, quilt is a main cause of unhappiness, or lack of inner peace, so if you stay with you wife without telling her, will you ever be happy? And if you do tell her, can she ever trust you?
Sorry to be so negative, but just want to keep it real for you.
Advice:..............Tell wife, see what happens............If she is willing to work on it...........You have a good woman..........And that is worth keeping.
If she can not forgive you.............Good luck........My advice.