We occasionally have unwinnable encounters in my campaign, with mixed results. In general, our players do not enjoy being defeated. It is especially challenging in a one-on-one campaign to pull off unwinnable encounters without creating an unenjoyable GM-vs-the-player tone.
That said, there are a few things I recommend exploring with your encounter. (Forgive me referring to the players in the plural. I'm not often in a one-on-one scenario.)
Get in their heads
If your players don't have trusted NPC companions, then consider getting into their own heads. "The instant he draws his blade, your heart pauses. The way he moves... only master swordsmen move so gracefully and so deliberately. As your mind races to defend yourself, you desperately seek for a means to escape."
This kind of storytelling is honest. It grants your players agency, but warns them that fighting to the last drop of blood may cost them their lives, and it prompts them in the direction of seeking creative ways out.
Don't be the enemy
No one enjoys spending their weekend getting their butts handed to them by a smug and merciless game master. You may play the villains, but you don't have to be the villain yourself. If there's taunting, keep it in-character, and don't laugh at their misfortune. Instead, narrate up a sense of urgency or desperation.
If they must be defeated, rather than escape, then give them some sense of nobility or the greatest good. I'm thinking Boromir in the Lord of the Rings here, dying in a vain attempt to save the Hobbits.
If the encounter is truly unwinnable, take some creative license at some point of the encounter and fast-forward the story to after. Don't make them play a protracted encounter which you have no intention of letting them win.
Don't be mysterious
It is keenly frustrating to play with a game master who expects players to be mind-readers. Game masters who take on an attitude of "If you'd solve this the way I wanted you to, it would have been easier," are just plain no fun. Be creatively open and honest about challenging encounters. Don't just say, "You don't have a chance," but say "You'll need more than brawn to escape this unscathed." There's no shame in leading them on a little by the nose.
Victory in defeat
Don't ever run an encounter that is unwinnable and nothing else. Whether the character gains knowledge, new skills, access to a critical ally in the dungeons, or a unique opportunity to play for a session as a ghost, make certain that the defeat is tempered by some accomplishment.
What is next?
Transition quickly from the unwinnable encounter to the next thing. If your session ends with the unwinnable encounter, then finish with a compelling cliffhanger rather than crushing defeat.
"A moment before your eyes close you see a stranger in the crowd, clad in a dark robe, nod in grim approval and utter a word of power."
Or, "You awake, hands bound at the wrists, and head throbbing from a blow you cannot remember. Beside you, a woman in coarse clothing says harshly, "Good. You're awake. I need a hand with this grating if we're going to get out of here."
The idea is that you give the players the expectation that the next experience will be entirely more heroic, and they finish the session with a better flavor in their mouths.
Be prepared to be surprised
It never fails to astonish me how resourceful my players are. I've pitted them against a few unwinnable encounters that they subsequently went on to win. Even a lowly commoner with a table knife could feasibly assassinate a king were she resourceful and lucky enough.
As game master, plan your stories but avoid being too committed to a plan. If the player does something particular ingenious to thwart a foe, even if they could never win in an outright face to face bludgeoning match, accept it and grant them the satisfaction of the win rather than responding with an "Oh yeah! Well now I'm invincible and you're dead. So There!" Always let player enjoyment outweigh the encounter design.