Very sorry for your pain and having to be here. I echo Cadet's recommendation on reading Divorce Remedy, as it has an excellent chapter on infidelity. The mid-life crisis (MLC) chapter is also excellent to see if this is part of the issue, and it can be found in the MLC forum.
Remember that you have time, so don't feel like you need to rush to get everything right in this moment. Do your homework, work through your grief a bit, and in the process come up with some goals. Remember that jumping before you've got the game plan (which unfortunately most of us have done) usually results in poor results, so back off any feelings like I need to make plans today or tomorrow and start my campaign to get my H back or else it could all fall apart. You have time and you need to respect that you are going through a terrible emotional upheaval.
Read the resources pages in the relevant forums (newcomers, MLC, infidelity), get DR, ask questions, allow some processing of pain and distance from the immediacy of the crisis, and you'll be far ahead of most of us who dove in when our lives were turned upside down by our S.
Good luck, stay strong, and keep posting. There is a lot of good support and benefit of having some other eyes on your sitch that you'll be glad of.
Me: 50 W:43 S6, S3 M: 12 yrs. T: 17 M is bad & Not happy Bomb Mar '14 S 5 Feb '15 D Bomb 13 Apr '15 (but "no hurry") DB Coach May '15 Wants proceed on D Aug '15 Starting 1-on-1 negotiations Sept '15