Before she died, River described a farewell scene between herself and the Doctor. This is my version of how that scene would play out if it appeared in the Christmas episode.

Clara ran to the Doctor as he stumbled into the TARDIS, Tasha following close behind. "Doctor, what happened?" Clara cried as she helped Tasha support the Doctor.

"No time to explain, Clara," the Doctor said as he pushed his way out of their arms. "I don't have much time."

"Time for what?"

"I need to go see River, now!"

Clara stopped in her tracks. "River? But, isn't she . . . dead?"

"At some points in time, yes. In others, she's still alive."

"Can you do that?" Clara asked as she followed the Doctor through the corridors of the TARDIS, unsure of where the Doctor was going. "Can you just go back and visit someone after they died?"

"Ordinarily, no," he said as they entered what Clara could only describe as a giant closet, filled with outfits of every kind. "At least, not without complications. But River is an exception. As we are both time travelers, we never met in the right order. My showing up at this point in my time line at a different point in hers is not as illicit as it normally would be, and right now, it's exactly what I have to do."

"But Doctor, why?"

"Now," the Doctor said, ignoring her question and looking at himself in a six-foot tall mirror. "I need to clean myself up. She can't suspect anything's wrong."
"Doctor, why do you have to see River now?"

The Doctor sighed and turned to her. "The first time I met River Song, she died. Later, I found that she and I were living our time lines backwards. The end of our time together for her was the beginning for me, and vice versa. But she told me that day, the day she died, that the last time she had seen me, I took her to Darilium and gave her my screwdriver. That's what I have to do now."
"But why now?"

"Because River Song knew my name before she died!" he practically shouted at her. "There's only one time I'd ever tell anyone my name," he said, quietly this time. "Only one time I could. At my death."

"Wait, death? What do you mean, death?"

"Clara, we're on Trenzalore. You've seen what I'm up against. This is it. My last great battle. My grave. This is where I die. This is when I give River my screwdriver. This is when I tell her my name. If I don't do this now, it changes my entire time line."

"Now," he said, turning back to the mirror and making a face at his appearance. "I think a change of clothes is in order." He began scanning the room, presumably looking for a new, less tattered outfit. "Aha!" he said, finally, and reached into the racks. He pulled out a black suit with a white dress shirt and a black bow tie. Clara turned her back as the Doctor changed into his new outfit. When she turned back around, the Doctor was once again looking in the mirror, this time fussing with his hair.

Whatever skirmish the Doctor had gotten himself into outside of the TARDIS had apparently wreaked havoc on his hair. It was burned in places and lay unevenly over his forehead. "Now, what to do about the hair? The minute she sees it, she'll be suspicious. Unless . . ." the Doctor's eyes widened. "Of course! A new suit and a haircut," he muttered. "Clara! Get a pair of scissors!"

Clara stared in shock for a moment, but did what she was told. She worked as quickly and as neatly as she could, trying to save as much of his hair as possible, but when she had finished cutting away all of the burnt and damaged hair, there wasn't much left. "It's much . . . shorter than it was," Clara warned him before she let him look in the mirror. "I'm sorry."

The Doctor winced when he saw his reflection, but after a moment, he turned away from the mirror and left the room. "It's only hair. It doesn't matter. Now, Clara, I need you to stay here with Tasha on Trenzalore."

"You're leaving me?"

"Only for a few moments. River doesn't know you, and I won't be able to explain. I'll come back just a few minutes after I leave, I promise. You won't even notice I'm gone."

"Are you sure about that? You're not very . . . punctual."

The Doctor stopped in his tracks and rounded on Clara. "Clara, I promise. I won't leave you on this planet alone."

Clara's teasing smile disappeared when she saw the Doctor's somber expression. "Ok. I'll be waiting for you."

Clara stepped out of the TARDIS with Tasha, and waved at the Doctor before he closed the doors and disappeared.