He killed him because of a mix of simpery in the rejection from Rhaenyra, and the shame he feels from breaking his sacred vows and being used basically as a whore for Rhaenyra to get her rocks off. He thinks being a whore is incredibly demeaning and he is insulted at the notion, and then here comes Joffrey Lonmouth, the Knight of Kisses, who is basically the kings whore, to say hey, you're a whore, I'm a whore, we're both whore buddies now. Lets keep our whore lives secret, us whores need to look out for each other. That causes him to snap.
The rumor around the realm is that Daemon fukked Rhaenyra, not Cristin. Cristin isn't aware of this, and his secret was eating away at him, which is why he spilled the beans to Alicent. Because he told her, he thinks it's only a matter of time before the word gets out, and he knows he would be tortured and have his dikk cut off along with either being executed or sent to the wall. That's why he was about to just kill himself first. That plus the feeling of being used and knowing he will never have the dream life of running away and eating oranges that he imagined with Rhaenyra.
I don't want to just insult you for not picking this stuff up, because I know you're not the only one, and it's not always easy to pick everything up with this show. I tend to miss some things as well on first viewing. You should check out the Alt Shift X channel on youtube. He does explanations for each episode and also has a Q&A where he clarifies a lot of questions people have about the episode. It might help you pick up on more of what's going on. I wouldn't venture outside of the HOTD videos though, most of his other videos explain things in relation to the main books which could spoil some things about the side books and the new show.