There's a difference between being knowledgeable versus actually learning about pain. You can anticipate pain, read about it in books, and act on it like how you see it portrayed in films. But nothing catches you off guard more than when you actually feel it.
Heartbreak is a physical experience. It starts with nausea, with butterflies fluttering and dying in your stomach. At this stage, your hands would tremble, but this usually depends on your caffeine tolerance. You might want to curl up in a ball, or walk out and cry in the rain like how they do it in movies, but it is a warm February night so option B is clearly out of the picture.
Pretend that you're asleep. Pretend long enough until they come in from the other room. Pretend that you're dumb and that you're deduction skills were not honed by an Agatha Christie novel. Pretend that you did not hear the gates open when his boyfriend arrived because you were too engrossed in the book you were reading. Pretend that you didn't hear them enter the next room and and that you didn't wonder where they were, that you didn't check outside, and didn't see his boyfriend's shoes on the doorway. Pretend that you didn't investigate. Swallow the pain like a grown up and act oblivious of the number of hours they were inside the next room.
Act dumb. Act like nothing happened. You've always been a good liar so use it to your advantage. Hold on. Carry on until his boyfriend goes home and until the lights are out. And then allow yourself to crumble. Allow the river inside you to flow. Cleanse yourself. Because tomorrow is another day to battle.