Heartwarming / The Hitchhiker's Guide to the Galaxy
The end of the first season of the radio series, the second book, and the TV show—Arthur and Ford become stranded on prehistoric earth, which—while overrun with Too Dumb to LiveAncient Astronauts—is also covered with unspoiled beauty and delicious fruits, and Ford and Arthur circumnavigate the globe before returning to their landing spot and embracing the local populace (set to "What a Wonderful World" in the radio series and TV show.)
Specific to the novels
The ending of So Long, and Thanks For All The Fish. There's something about Marvin finally feeling happy for once before he dies that just makes one feel all tingly inside.
Not just that, but Marvin's last words were "Goodbye, Arthur." Not a final snark or reminder of his depression. Just a simple goodbye. Arthur is just as touched as we are.
The entire book is a CMOH. Arthur returns home, meets a nice girl, and basically has the life he's been longing for for the past eight years. It's got plenty of Adamsian wit but is sprinkled with a lot of very sweet (and fittingly off-kilter) moments. Of particular note, at least to me, is Ford and Arthur watching Casablanca together. It was the last thing Ford was doing the night before the Earth got destroyed, and his little way of showing that, for all the sarcasm, he actually quite likes humanity. (So much, in fact, that when he helped Arthur and Fenchurch hitch a lift on the spacecraft, the only possessions Ford brought with them were two large boxes of videocassettes of movies.) In fact, there's the fact that he came back at all and that the first thing he did was find Arthur, as well as his joy (and subsequent confusion) at having all of his hard work on the Guide entry on Earth recognized and put in place of "Mostly harmless."
This little tidbit, in which an old lady on a plane sees Arthur and Fenchurch making love on the wing:
Mrs E. Kapelsen of Boston, Massachusetts was an elderly lady, indeed, she felt her life was nearly at an end. She had seen a lot of it, been puzzled by some, but, she was a little uneasy to feel at this late stage, bored by too much. It had all been very pleasant, but perhaps a little too explicable, a little too routine.
With a sigh she flipped up the little plastic window shutter and looked out over the wing.
At first she thought she ought to call the stewardess, but then she thought no, damn it, definitely not, this was for her, and her alone.
By the time her two inexplicable people finally slipped back off the wing and tumbled into the slipstream she had cheered up an awful lot.
She was mostly immensely relieved to think that virtually everything that anybody had ever told her was wrong.
And, of course, the last Guide entry (and, indeed, chapter) of the book, which—unlike most other Guide entries—is happy and uplifting. It tells the tale of a genius genetic engineer who is told to build super-soldiers to ward off alien invaders, but gets sidetracked by the view from his lab window and instead designs a type of fly that can find its way through a half open window and an off-switch for children. The incoming invaders (who are only off to war because they can't cope with things at home) are so impressed by the breakthroughs of this one guy that instead of wreaking havoc, they form an alliance and trading agreements and everyone lives happily ever after.
It's a little sad in hindsight, but Arthur is "finally having a nice day" when he and Fenchurch are in Santa Barbara note where Douglas Adams lived for the last year of his life and where he died of all places.
Related to the first above: in Life, the Universe, and Everything, Marvin encounters a Lorro, a living mattress. It's implied that the former actually enjoyed the company.
A small one in Mostly Harmless that most only really think about after reading the book is that, at the very end of the final book, Arthur is stood in the bar and looks at Ford. He could have looked at Trillian, the woman he loved, or his own daughter but he looks at Ford Prefect, the man who saved him from destruction of Earth in the first book and the alien doomed to die on Earth in the last.
Specific to the 2005 film
Of all things, the 2005 film's use of the invasion fleet attacking Earth and being swallowed by a small dog comes off as a heartwarming moment.
This dedication is even more heartbreaking when you notice that it occurs exactly one hour and 42 minutes into the movie. Probably accidental, but still an amazing coincidence. Combine that with the last scene in the film, as the Heart of Gold activates the Infinite Improbability Drive, changing into various objects; the last thing it changes into is the face of Douglas Adams.
When Arthur finally admits how he feels about Trillian, as Lunkwill and Fook try to remove his brain.
Arthur: Fine. Fine, take it! Because my head is filled with questions and I can assure you no answer to any one of them has ever brought me one iota of happiness! Except for one. The one. The only question I've ever wanted an answer to, is she the one? The answer bloody well isn't forty-two, it's yes. Undoubtedly, unequivocally, unabashedly yes. And for one week, one week in my sad little blip of an existence, it made me happy.
Another meta-example: Alan Rickman downplayed his voice over role as Marvin, and gave Warwick Davis the major credit for Marvin (similar to how David Hyde Pierce demurred in taking credit for the role as Abe Sapien in Hellboy.)