I.e., the main character is given superpowers fueled by his 'dying will;' initially by shooting him in the head with special bullets that induce this level of sudden Heroic Willpower (and Shirt Disease), then steadily less violently and more intentionally, until he's able to switch into this mode at will, and it's more or less just a super mode which is on fire.
In the D.N.Angel manga it's found out that the people in Hiwatari's family have short lifespans, and he doesn't have much longer to live. However, at the same time, he notes that Daisuke was the only person who gave him joy in life.
Macross Frontier plays with it some, uniquely in a way. Sheryl Nome gets hit with Your Days Are Numbered thanks to an Incurable Cough of Death in the second half of the series, and Alto Saotome (finally) ends up getting romantically involved with her after he finds out. There is a subtext to this that it might all be something of an act that the two of them are playing out, ignoring all other considerations just for Sheryl's sake. Sheryl even tries to let Alto off like this, presumably so he'd be free to chase after her rival in the Love Triangle in their last talk before the Final Battle, but we never find out what Alto had to say about that, as Sheryl gives him a "Shut Up" Kiss, declaring that no matter what he said, she wouldn't be able to sing (It's a Macross, music is VERY IMPORTANT). The series ends promptly after the Final Battle without Alto ever finishing what he was going to say. As you might have guessed from the wall of spoiler text, it's complicated, and this is the short version. Still, it's clear that Character Two was very important to Character One.
The Timothy Dalton/Anthony Edwards movie Hawks. Two terminally ill friends decide to live as best they can for as long as their bodies hold out.
Harold and Maude - An Emo Teen who attends funerals and commits mock-suicide for fun gets into a relationship with a 79-year-old woman who is basically the septuagenarian equivalent of the Manic Pixie Dream Girl. She kills herself for real in the end, but he still stops faking his suicides and starts actually living life.
In fact, there seems to be a subtrope of Manic Pixie Dream Girl films - such as Autumn In New York and Sweet November - that center around the fact that the girl in question is dying, and wants to try to live life to the fullest. The fact that this effectively makes their life goal "help some guy remove the stick from their ass" is incidental.
Dream With the Fishes, where a morose voyeur is saved from suicide by a happy-go-lucky fellow that is terminally ill and wants help living out a few fantasies before meeting his maker.
The 90's German movie Knockin' on Heaven's Door (yeah, like the song) is about two men with terminal diseases spending the last of their days enjoying some millions in cash from the mafia they got their hands on.
If we mean the same movie, then their original plan was just to go and see the Sea. Money just happened to appear bit later.
Joe Versus the Volcano has this as its plot. Joe has a decidedly mediocre life, with a mediocre job, but even his mediocrity is ruined by his massive hypochondria. When he is told that he really is dying, from a "brain fog" that has no detectable symptoms until it ultimately proves fatal, an eccentric millionaire offers to give him an all-expenses-paid trip to a tropical Pacific island where he will then sacrifice himself in a volcano in accordance with native tradition to secure the millionaire the mining rights for the island. At the end it is revealed that he never had a "brain fog," and his doctor was on the payroll of the millionaire looking for a schlub that he could trick into leaping into a volcano.
In El juego de la verdad, Ernesto is mistakenly told that he has three months to live. During a game of truth or dare, his friends convince him that he should do the things he's always wanted to do and assure him that they will go along with anything he says. The things he wants to do include skinnydipping and sleeping with his best friend's fiancee.
The film Scent of a Woman does this trope in both directions. Colonel Slade teaches poor, outcast prep student Charlie that you don't have to lie down and let other people's expectations of you determine your life. Charlie teaches the blind, bitter Colonel that you don't always have to spit in people's faces to make yourself important, helping others and sticking to your principles accomplishes the same thing. The Colonel stays blind, but is a little less bitter and Charlie accepts that he'll never be one of the rich White kids at his school, and is okay with that.
In L: change the WorLd, L spends the last week of his life taking care of two children, even holding a picnic for them while on the run.
In Short Time, Dabney Coleman plays an overly cautious, by the book cop who due to a mix-up is told he's terminally ill. He then discovers that his cop life insurance policy will only cover "professional damage" meaning he has to be killed in the line off duty. Wanting his wife and son to have the money, he decides to no longer play it safe, tosses "the book" out the window, and becomes the sort of risk-taking supercop who you only find in movies. Finally, after nearly twenty years of drudgery on the force, begins to believe that his life and his job means something.
In Iron Man 2 when confronted with his poisoning and seemingly imminent death, Tony asks Natasha Romanoff what she would do if she had only a brief time to live. Natasha, evaluating him for S.H.I.E.L.D., told him that she would do whatever she wanted. As a result, he decides to have a wild party at his house in Malibu in full armor, get completely drunk, and thereby endangering everyone around him, making him a rather less positive than usual take on the trope.
Melancholia has an interesting take on this. Justine develops from being miserable and depressed to calm and peaceful when she realized everyone was going to die from planet Melancholia colliding with Earth. The final scene had Justine and Claire’s son making the magic cave as an attempt to calm him down and try to enforce hope. Justine came through in the end at keeping everyone calm and together, showing how certain situations can sway our attitudes and actions.
The entire premise of Deadline, in which the narrator knows he's dying but keeps it a secret from everyone, decides to not go through treatment and live the last year of his life as best he can. While all he seems to care about is getting a street named after Malcolm X, the book has a feel of "life is AWESOME!!" to it.
Older than Television: Valancy Stirling of Lucy Maud Montgomery's The Blue Castle (1926). Valancy gets a diagnosis of terminal heart disease, then uses her new-found remaining time on earth to live like a free spirit, talk back to her rude relatives, and fall in love. After a great shock doesn't kill her, she goes back to the doctor and finds out her letter of diagnosis was mistakenly exchanged with that of an old woman with the last name Sterling.
Live Action TV
The premise of the very short-lived SitcomTwenty Good Years starring John Lithgow and Jeffrey Tambor.
In one episode of Star Trek: Deep Space Nine, Quark gets diagnosed with an incurable and frequently fatal syndrome by a doctor on Ferenginar. He auctions off his vacuum-dessicated remains in traditional Ferengi fashion before he dies, but then it is revealed that the diagnosis was incorrect.
His initial response? "It means I get to sue Dr. (whoever) for malpractice!"
Subverted in an episode of House. Wilson finds out that he had earlier misdiagnosed a patient with terminal cancer. When telling the man that he is in fact perfectly healthy, he is surprised to find the man is outraged: knowing that he was going to die within six months had given the man real happiness for the first time in his life. He then promises to sue Wilson for malpractice.
Made funny when House gives the man the name of a good lawyer. Because he's House.
Played straight in a different episode. A young girl with terminal cancer who has an astonishing bravery and dedication to enjoying the little time she has left. Despite his best efforts as misanthropy, the girl's zest for life rubs of on House and he ends up buying a motorcycle. The series' last shot is of House and a terminally ill Wilson going touring on motorcycles.
In an episode of Scrubs made to parody sitcom cliches, one patient was found to only have 24 hours to live, and was taken out by the doctors to go through a list of adventures before he died. Then, at the end of the day they found out his chart had been switched with another patient, so he was not going to die, and the patient who was was antisemitic so no one cared about him.
They had a separate episode with a subplot almost exactly identical to the House example above.
The Big C has Laura Linney's professor character diagnosed with terminal cancer, deciding not to tell her family (to spare them misery), and spending her last few months taking life by the balls. The first season of the show then thoroughly deconstructs this trope, as her actions look extremely bizarre to her family and only widen existing riffs, while not really bringing her a lot of joy.
In the Korean SeriesScent of a Woman, the lead is given six months to live. She creates her bucket list, including dinner with a pop star and the chance to fall in love.
In the Israeli sitcom Zanzuri, the eponymous character is told he has sixth months to live before dying from a heart disease. He then sets out to do everything he’s always wanted to do (being in a rock band, making love to another woman who is not his wife) and taking care of his affairs before dying (entering the Guiness Book of World Records to be remembered by, finding a new husband for his soon-to-be-widow). He finally dies just a second after his wife tells him she’s pregnant.
"DC-10" by Audio Adrenaline, although the cause of death is a bit more sudden and humorous than illness.
A "couples" example from Rent: Angel and Collins are the "live like you're dying" couple who get Roger to open up a little. Mimi, who is Roger's love interest, finishes the job despite a considerably rocky start with him.
Lampshaded in the revival of You're A Good Man Charlie Brown, at the end of Sally's song "My Philosophy":
Sally: You know, someone had said that we should live every day as if it were the last day of our life.
Lucy: This is it? Help me! Help me! I've got twenty four hours to live! AAAAAAAAAA!!!
Sally: Clearly, some philosophies aren't for all people...
This happens to several characters in Tales of the Abyss, but some take it better than others...
Shadow Hearts: Covenant has a strange example. In the good ending, Yuri is impaled on a rock spire to prevent his soul and memories from disappearing, so he could essentially die as himself and be reunited with his dead lover's soul. After the credits, though, it is shown that he is reborn as the man he was in 1913, heavily implied to have all of his memories intact, and he's restarting his life from the moment he met his lover as his second chance to save her life and create the good ending of the first game (Covenant begins as a sequel to the bad ending of the first game).
Metal Gear Solid 4. The protagonist is not only extremely old, but has to commit suicide to save the world. He saves the world, is talked out of suicide at the last moment, and then attempts to leave to spent the six months he has left to live agonizing about how miserable his life was. Fortunately, his best friend visits him post-credits and says he'll be by the main character's side for the rest of his life, and promises he'll always remember how amazing he was. He also quits smoking.
Subverted in Jak II. The audience is made more aware of this than the characters, given that they're regularly bombarded by creepy voice overs from Baron Praxis's City-radios, which often serve as "Wanted Dead or Alive" adverts or handy little reminders to Jak that the Dark Eco in his body will eventually kill him and he's just delaying an inevitable and highly painful end when Praxis could make it so much faster and painless... It doesn't stop Jak, however, who doesn't so much plan to end his days happy as he does plan to gun the living bejeezus out of the Krimzon guard and seek his revenge against Praxis.
The unnamed terminally ill protagonist of Narcissu provides the impetus for the also terminally ill Setsumi to go on a road trip to see the flowers instead of dying in hospital.
Tsukihime: While not actually on the verge of death himself, due to a tragic accident during his childhood that claimed his parents and grandmother, Arihiko Inui was painfully aware that death could come at any moment. Luckily for him, he becomes friends with a certain Shiki Tohno, a boy who really was commonly on the verge of death when he was younger, but whose maturity and philosophical outlook were far beyond his years...
Examined by Bug, who shows that you need to plan your spending wisely while doing this.
Alisin from Fans!! in early strips. Finding a cure was the first step of her Character Development from the hedonistic "Alisin" of the first two books to the "Ally" of the fifth and onward.
This is hinted to be the motivation of Larisa from Sandra and Woo, who's certainly diabetic, and also hiding some additional drug regimen from her friends.
Kirk in The Gungan Council lives vicariously all the time due to having just a few more years to live.
The Simpsons, of course, has mocked this a few times, most notably with Homer believing that he would die after eating an improperly prepared poisonous fish.
In another episode Homer reads a self-help book that advises him to "Live each day like it was your last". Cut to Homer sitting on the curb sobbing "I don't want to die!"
Then there was another episode with PJ doing this because he thinks his dad will kill him when he sees his report card.
In one episode of Camp Lazlo, Scoutmaster Lumpus steals a rare type cheese wheel from Raj because had never tried it. As it turns out, this particular type is extremely deadly and Lumpus only has a few minutes to live. He spends it doing everything he was not allowed to or unable to do in his life. Naturally, it turns out to be a cheap knock-off and completely harmless.