There are definitely two people making you feel this way - him and you. You cannot control his contributions to your feelings, but you can control your own contribution (especially with practice). We all have our own internal dialog that drives our mind around and around in the same circles day after day and night after night. Trying reframing the questions you are asking yourself. Ask yourself what you can do to heal today and how you can push your healing forward. Try to change your obsession from his affair to your recovery and your survival from his affair. Little by little it can change your mood for the better.

...and nighttime is definitely the worst part for me too. It is invariably the first thing I think of every morning when I wake up alone.

Also remind yourself that you will be over this someday. I wish that I could tell you that you'll get over this soon. But it is an intense emotional trauma and it takes time to heal.