This image is from “On My Mind,” distributed by The New Yorker.

When finishing shooting of his 2003 Academy Award winner “This Charming Man,” Danish director Martin Strange-Hansen, creator of the Oscar-nominated short film “On My Mind,” ended up singing “for three hours straight” in a karaoke bar because he didn’t understand the traditional one song rule. In an interview with The Michigan Daily, he shared that he later used the experience while at a script camp to inspire a short story: What if someone refused to stop singing the same song over and over? At the time, he never thought he would use this premise in an actual film.

In 2001, Strange-Hansen lost his daughter. He and his wife were with her in the hospital, an important doctor’s visit looming ahead of them. Unable to sleep, Strange-Hansen went to the nearest bar, which was mostly empty. Sitting at the bar, he listened to the people next to him, who were deep in a conversation about “tying rope around the globe.” He realized, “You can be so close in proximity, but you never know what your fellow man is going through.”

This realization stuck with him for nearly 20 years, when his experience with saying goodbye and letting go of a loved one inspired “On My Mind.” At this point, years after its conception, the story of the man who refused to stop singing karaoke returned to him because, he said, “Suddenly it struck me — I know why he has to sing that song.”

From these pieces, “On My Mind” came together. The moving, 18-minute short, which is part of the New Yorker Screening Room video series, stars Rasmus Hammerich (“A Terrible Woman”) as Henrik, a man who becomes determined to sing Wayne Carson, Mark James and Johnny Christopher’s “Always On My Mind” on the karaoke machine at a nearly empty bar. He sings for his wife, Trine (Sissel Bergfjord), who lies dying in a hospital bed, and as obstacles arise and the bar owners (Camilla Bendix, “Hvide Sande” and Ole Boisen, “A-klassen”) resist letting him sing, the urgency of the situation becomes clear.

There’s something particularly touching about that song and the way Hammerich sings it, dwarfing the microphone on a stand far too short for him. As Strange-Hansen described, this gives him a “fragile feeling” despite his large, domineering appearance. From the first time he sings, a connection forms between Henrik and the viewer — one that will draw tears from our eyes as the film goes on. The song itself is heartfelt but neither joyous nor entirely tragic, and its nostalgic quality infects the film as Henrik looks back on not only his love for his wife but his regrets that he no longer has time to reconcile. Strange-Hansen said he chose the song because it addresses the necessary self-reflection that accompanies the process of saying goodbye.

Strange-Hansen asked Danish producer and founder of M&M Productions Kim Magnusson (“Men and Chicken”) to work with him on the project. The two have worked together previously, and, as Magnusson said in an interview with The Michigan Daily, the story resonated especially deeply because he had recently lost his mother. It was a story that “needed to be told,” and they began the filmmaking process under the unprecedented circumstances of the pandemic. Magnussen described how, where normally “we would all sit in a mixing studio; we would all sit in an editing room,” they instead worked using links, phone calls and Zoom meetings. They had the “tiniest crew imaginable,” said Strange-Hansen, consisting of eight crew members and three actors. Per pandemic guidelines, they could only allow 10 people in a room at once, so one person was always out of the room during filming. When Strange-Hansen worked with his editor, it was over Zoom meetings, and “suddenly we were not talking about ‘could we cut one frame there’; we were talking more about essence… It became more of a philosophical talk,” he said of the editing. “I’ve never done that before, but it was actually quite good.”

A benefit of working in the early pandemic was that bars were closed, making it an ideal time to set the film in a bar. On the other hand, it was possibly the worst time to find a location for the hospital scene Strange-Hansen had written. At a time when many people could not even visit their loved ones in hospitals, he understood how outrageous his request to bring in a film crew would seem. On the day before filming, he got permission to film in a room at a place where nurses are trained.

The story and song are compelling in their own right, but it is Hammerich’s performance that fully draws the viewer into the film. Finding actors was not difficult, Strange-Hansen said, their general attitude being “please take me out of my home.” He initially contacted Hammerich, whom he had seen in other films, to play the bartender, because “he’s big, and he’s strong, and he looks scary.” While Hammerich loved the script, he refused the role on account that it was nothing new for him. He wanted to escape from being typecast as the scary, emotionless man and play a part that allowed him to show emotion and love, to cry despite the stereotypical implications of his outward appearance. This resonated with Strange-Hansen, and Hammerich was re-cast as the lead. The contrast of his rugged, almost cold presence and the fragility that surfaces from within him is part of what makes the film so moving.

A thread throughout the film is the idea of a life touching the world and leaving only an “imprint of a human soul” behind. This appears as dew on a glass Henrik examines in the bar and a handprint in the condensation on a window. This was Strange-Hansen’s way of bringing Trine’s presence into the film more, saying he wanted to show death, and realized “how fleeting dew is, like we are fleeting. We are here for a second. And we’re gone.” The film itself captures this masterfully, coming to life in its brief duration, its own soul imprinted on the viewer — on our minds. It is one that will last far longer than the condensation that clings to glass.

Daily Arts Writer Erin Evans can be reached at erinev@umich.edu.

Correction: The year Strange-Hansen lost his daughter has been corrected, and the details about when he sang karaoke have been clarified in order to avoid the assumption that this happened while at script camp.