Yes, of course - SPOILERS!!
I was struck at an early age by how powerfully attracted I was to dark films and tragic endings. So many of my favourite films are distinguished by concluding with the (unexpected?) death of the lead character(s).
Off the top of my head....
My Favourite Films Where the Leading Character Dies at the End
(Dir. Anthony Mann, 1961)
Rodrigo Diaz, 'The Master', iconic general in Spain's wars against the Moors, according to legend, rode out into battle for the last time already dead (after being mortally wounded by an arrow in the chest during the previous day's fighting), strapped into the saddle of his faithful warhorse Babieca, intimidating the enemy and enabling their rout. And Charlton Heston somehow makes it completely believable. I saw this on TV about a gazillion times during my early childhood, and never failed to be moved by the final scenes.
Cool Hand Luke
(Dir. Stuart Rosenberg, 1967)
Possibly my favourite film ever - if I really have to choose just one, one that had a particular resonance with my personality or a particular impact on its development. You don't actually see Luke die, but you know that he's dying when they take him away in the ambulance - shot in the throat, unable to speak, slowly bleeding to death, but still beaming his trademark smile in mute defiance. And you know that he's destined for death through most of the story - the Messianic imagery overlayed on his self-destructive, suicidal tendencies builds up a sense of inevitable doom, even from the opening scene. (One might, of course, also mention Milos Forman's 1975 One Flew Over The Cuckoo's Nest, but that is essentially the same story transposed to a slightly different setting; and, for me, not such a moving or convincing realisation of the idea of the transformative but martyred hero as Cool Hand Luke.)
Bonnie and Clyde
(Dir. Arthur Penn, 1967)
The infamous hoodlum lovebirds (Faye Dunaway and Warren Beatty) are shot dozens of times in a ruthless ambush in the final scene. Of course, most crime/gangster films (and the careers of most of America's notorious Depression-era criminals) have ended like this - I also particularly liked John Milius's 1973 Dillinger (with Warren Oates in the title role).
(Dir. John Schlesinger, 1969)
OK, so young Joe Buck (Jon Voight) escapes his life of sleazery in New York to attempt a new start in Miami, but his friend Ratso Rizzo (Dustin Hoffman) dies in the bus seat beside him before they get there. This was an image that haunted me throughout my childhood, and returned - unwelcome, unbidden - to my mind every time I rode a Greyhound myself (which I did a lot during the 1990s).
Ring Of Bright Water
(Dir. Jack Couffer, 1969)
One of the most beautiful stories ever made about the love that can exist between a man and an animal, a thoroughly sappy, feelgood film... right up until the moment when the otter gets killed. I cried when I first saw this in the cinema at the age of about 7 or 8. I probably still would today. Absolutely heartbreaking!
Butch Cassidy and The Sundance Kid
(Dir. George Roy Hill, 1969)
No, you don't actually see them die. But you don't need to: the inevitability of death has rarely been so movingly established in the closing minutes of a film. And you do hear - as the final frame, that wonderful image of self-deluding bravado and defiance, freezes and fades to sepia - the volley of shots from the dozens of Federales surrounding them on the rooftops. (Of course, the annihilation of the hero subsequently became somewhat commonplace in the more gritty, demythologising modern Westerns, Peckinpah's The Wild Bunch and - I think - even better Pat Garrett and Billy the Kid being the most notable examples.)
(Dir. Dennis Hopper, 1969)
Our counter-culture heroes have run up against a fair amount of Middle American hostility and incomprehension in the film, and have already witnessed the murder of their travel buddy George (Jack Nicholson); so, we're probably not expecting them to come to a good end. Even so, the suddenness and sheer randomness of the denouement is deeply shocking: a pair of rednecks in a passing truck shoot Dennis Hopper by accident, and then return to murder Peter Fonda to cover their tracks - and it's all over in just a few seconds, a brutally abrupt ending that is all the more of a jolt because the pacing of the rest of the story has mostly been so self-indulgently leisurely.
(Dir. Mike Hodges, 1971)
This classic British gangster film is one of the most relentlessly bleak and amoral ever made. London mob enforcer Jack Carter has completed his private revenge against the local villains he deems responsible for the murder of his brother in his native Newcastle, but he has ruffled too many feathers in the process - including those of his own employer, a London crime kingpin - and is shot by a sniper in the very last scene.
(Dir. Richard C. Sarafian, 1971)
This great, existential road film provided one of the most vivid of my early experiences of the cinema. The protagonist, Kowalski (Barry Newman), Vietnam vet and former race driver, has run out of reasons to live. While delivering a suped-up Dodge Challenger across the south-western States to California, he becomes involved in a huge police chase; and, in the final scene, commits suicide by driving at full speed into a roadblock.
Harold and Maude
(Dir. Hal Ashby, 1971)
Ah, so this one is a semi-cheat: teenage death-fetishist Harold (Bud Cort) appears to have killed himself by driving his car off a cliff at the end, but in fact has faked his death. However, his septuagenarian lover Maude (Ruth Gordon) really has committed suicide just prior to that. This is an extremely black comedy that tramples on as many taboos as it can; but, for a film that's almost entirely about death, it's remarkably life-affirming. I once decided to break up with a girlfriend when she didn't 'get' this film: there are some incompatibilities that are just too large to be worth trying to overcome.
(Dir. Douglass Trumbull, 1972)
This touching low-budget science fiction eco-fable from special effects wizard Trumbull (the VFX director on 2001) seems to have been all but forgotten these days, although I fancy it still enjoys 'cult' status amongst those of us lucky enough to have caught it on TV in our childhoods. Rogue astronaut Bruce Dern blows up himself and his spaceship at the end of the film, in a bid to ensure the survival of a 'space ark' he has been tending, a huge glass dome that is the last repository of Earth's extinct flora. I was intrigued to discover (on IMDB, just now) that the screenwriters included Michael Cimino (a few years later to be become a noted director himself) and Steven Bochco (creator of the superb '80s cop show Hill Street Blues).
Electra Glide In Blue
(Dir. James William Guercio, 1973)
Police Officer John Wintergreen (Robert Blake) doesn't have a very happy time in this determinedly untypical, unpredictable early-70s cult favourite: uptight and nerdy, scarred by his experiences in Vietnam, he has to learn to compromise with the incompetence and prejudice he encounters all around him, both inside and outside the police department, and - despite his success in the murder investigation he undertakes on his own initiative - his dream of escaping from uniform police work into the homicide detective squad seems unlikely to be realised any time soon. Nevertheless, as far as I recall (and I've only seen this once, 30 years or so ago - on a BBC2 Sunday night season of recent American movies deemed too oddball even for a late-night audience on the more mainstream BBC1 [though it was on BBC1 that I saw most of the rest of these picks, usually in the 'Monday Film' slot from 9.25 till late]), there was no prefiguring of tragedy as there was with most of these other selections (except insofar as, it seems, all great American films of the early '70s ended tragically). So, the final scene, where - quite out of the blue, unexplained, unmotivated - he is blasted off his motorcycle by a shotgun, is quite devastating. And it's followed by a long, long closing shot: the camera pulls away, leaving Wintergreen sitting motionless in the middle of a desert highway, with the familiar stone towers of Monument Valley clustered on the horizon; the camera keeps on moving down the road, for 3 or 4 minutes or more, until the slain cop has disappeared from sight. It's a stark, haunting image of the hopelessness and meaninglessness of human endeavours, the murder soon being eclipsed by the desolate beauty of the landscape. [Here's that scene on YouTube, accompanied not by the original soundtrack, but by a Yo La Tengo song called We're An American Band.]
(Dir. John Carpenter, 1974)
Carpenter's film school graduation project is another of the films that have won a very special place in my heart, certainly amongst my top 5 or 10 personal favourites, perhaps in the top 2 or 3 (it is, after all, the origin of my online alias). A computer-controlled nuclear bomb becomes self-aware and decides to 'fulfill its destiny' by committing suicide, destroying the deep space scoutship Dark Star and all of its crew members along with it. Well, OK, Commander Powell appears to have miraculously 'survived' the explosion, frozen in a huge block of ice (but he was 'dead' already, his brain kept barely ticking over in cryogenic suspension; and the ice obviously won't preserve him forever). Talby the mystic, floating free of the ship in a spacesuit, survives the blast, and is seemingly 'rescued' - absorbed - by a passing group of 'living' asteroids; but that might be just a dying hallucination. And Dolittle, the acting commander of the ship, also survives for a short time in a spacesuit; he has the wacky idea of trying to use a piece of metal wreckage as a surfboard on which to fly down to the surface of a nearby planet; inevitably, he burns up in its outer atmosphere, the final image of the film. The other two crew members - including Pinback, the only character with whom we really identify - have perished aboard the ship in the explosion. So, basically, everybody dies: it's the Hamlet option for plot resolution.
(Dir. Brian De Palma, 1983)
The strangely admirable Cuban drug baron, Tony Montana (Al Pacino), ends the film trying to defend his mansion against the onslaught of a small army of hitmen hired by his vengeful former partner, the Bolivian cocaine producer Alejandro Sosa (Paul Shenar) - with only his personal armoury of large automatic weapons and the pyramid of coke on his desk to assist him. Obviously, he is not going to prevail, but he puts up a damn good fight: "Say hello to my little friend!" [This is inevitably going to get pulled from YouTube soon, but for now you can watch that closing scene here.]
(Dir. George Sluizer, 1988)
The creepiest ending of any film I've seen, and one of the most devastatingly effective uses of character identification (we become completely absorbed in Rex's obsessive quest to learn what happened to his disappeared girlfriend, we come to accept, to share his determination to find out at any cost) merging with camera POV, where in those terrifying final seconds we discover, as Rex (Gene Bervoets) does, waking from his brief, drugged sleep, that he has now suffered the same fate... being buried alive.
The Hairdresser's Husband
(Dir. Patrice Leconte, 1990)
I suppose this is nominally a 'romantic comedy', though done as only the French can, with dark undertones and unsettling weirdness intruding from time to time upon the quirky fun - particularly at the end, when Mathilde (the impossibly gorgeous Anna Galiena) becomes disquieted by the excessive happiness of her claustrophobic but idyllic relationship with Antoine (a typically nerdy and lugubrious Jean Rochefort, who really should never have got this lucky in the first place), and decides to drown herself rather than face the risk of their love ending in some other way. Has there ever been an American romantic comedy that ended with a suicide (other than Harold and Maude, above)?
Hmm, perhaps killing off your leading character at the end was a fashion at the time, a trope of the early '70s 'indie' cinema on which I grew up. I note that all but four of these films were made in the space of a few years at the end of the '60s or the beginning of the '70s; and all but the last three of them got their first showing on British television during the 1970s, mostly towards the end of that decade, when I was just on the cusp of my teens. Coincidence? Probably not.