Oh my god, literally ew, I am so sorry you had to see that because that is literally my worst nightmare. Catching someone red-handed is so traumatic and disgusting, and I can’t even imagine how hard your heart dropped in that second. He is officially the absolute worst and you deserve way better than that trash.
Please do not let him try to talk his way out of this with some stupid excuse like “it’s not what it looks like” because his pants were literally down. There is no coming back from that, and if you forgive him, he’s just gonna do it again because he’ll know he can get away with it. Don’t blame yourself either, because his cheating is 100% his fault.
You need to drop him immediately like a bad habit and block him everywhere so you don’t have to look at his face. Go stay with a friend or family member, cry it out for a few days, and then just move on. He showed you who he really is, so believe him and kick him to the curb.