A. He was heartbroken when his girlfriend left him.

B. She was heartbroken when she didn’t get the promotion.

We can use “heartbroken” to talk about romantic situations / a variety of situations.