+1 Mark, insightful as usual. Agree with StarPolisher; avoid the trite promise that cannot be kept.
That said, promises can be made, promises that are at least plausibly able to be kept if the MC does not give up, takes risks with his life, etc. For example:
"Promise me you'll take care of Karen", Roger said. "Don't let her mother take her. She's the only reason I'm here, and I've failed her. I failed my baby. Promise me."
"I promise. I won't let that happen. On my life, Karen will be safe."
Roger seemed to breathe a deep sigh of relief; but did not inhale afterward. Nor did he blink, and as Roger's eyes dulled; Stan knew he was gone. As he laid Roger's head gently to the ground, he said once more, "On my life", and rose to walk into the jungle, his face resolute.
Any promise to survive is implicit: A necessity to keep his other promise, to sacrifice his own life trying to save Karen.
Of course your story can be different, but instead of making a vague promise to live for its own sake, make a specific promise. The dying friend doesn't just want the MC to see a good movie or get laid in Paris, he wants something very specific and very important, one thing, that is most important in his life that he knows he will not accomplish, and the last favor his friend can do for him is to make it happen.
That is the motivation for not giving up, for risking his life instead of playing it safe, for breaking his own hand to escape from the cuffs that bind him.
In other words, "promise me you'll live" is a self-centered promise, and the MC may find himself in such pain (emotional or physical), or in such despair over his own lost loved ones, that he truly doesn't care to live and continue that pain. But "Promise me you'll protect Karen" is a sacrificial promise, once made it makes no difference how you feel or what you want in life, you made a commitment to perform an act and you don't get to choose death until you have definitively succeeded or failed.