One of the many things I like about Casablanca is that even though the love story has an unhappy ending, the movie has a happy one. Rick finds new purpose in his life, leaves Ilsa with Victor, and goes off with Louis to fight the Nazis. He doesn't get the girl, but he ends up doing the best thing he could with his life, and he knows it.
It's the kind of ending that a utilitarian can love. Despite the fact that people are built to obsess over minor matters in their personal lives, these aren't the things that matter from an agent-neutral perspective. And if you can attend more directly to the agent-neutral considerations, you'll pay less attention to problems afflicting only yourself, and become more effective in making the world a better place.
I think of this now because it's becoming apparent that I have less control over my romantic life than I have over the fates of other people I don't know, several thousand miles away. Even my meager assets can save lives in developing countries, while I can't brighten the days of a lonely girl two blocks away. It's time for me to internalize that, and live accordingly.