This answer assumes that one of the things interfering with the memorability of your character deaths is disrespect and looting from peers. We have done a few things in our campaign that address this, which you may consider in yours.
Our campaign features occasional character death. One of my concerns as Game Master was that looting the corpses of one's peers can lead to unintentionally powerful inventories as well as lead to a dissatisfactory experience for the victim.
We addressed this by having two simple rules related to character death:
Rule 1: No looting allies
What we mean by this rule is that all players assume their deceased character's possessions will be delivered, if retrievable, to the character's next of kin. The replacement character will arrive with her own inventory.
As players, my group understands that this is necessary to preserve game balance and to de-incentivize death. As characters, they treat it as the mutual respect due to allies and dear friends. Even our rogues agree that this is the way to be before we begin.
Rule 2: No unavoidable character death
I don't like boring deaths or un-entertained players. As a result, I don't allow them.
Our wizard stands in the center of his allies in a veritable wall of meat-shields. The troll-like "Thought Stalker," selecting the most intelligent of the party as his prey, materializes out of thin air and strikes... and strikes... and rends.
In situations like these, I intervene as DM. There's nothing memorable about playing as defensively as you can only to be one-shot by an ill-conceived encounter. Usually I can describe it away, but sometimes I ask the group if they have an imagination, they nod, and I rewrite history.
Contrast this to an encounter with an Umber Hulk.
Our rogue had many warnings that this was a creature to keep some distance from. He moved adjacent to the beast, ignoring the protestations of his allies, shouted a challenge to the beast, and got ripped to shreds on the creature's turn.
I didn't intervene. The party went to great expense to resurrect him later, which was an adventure on its own.
My purpose in relating these two stories is that you can make character death memorable by denying non-memorable deaths from occurring. Choose your character deaths carefully. Sean Bean can only die once a campaign, so make it good.
Memorable Trap Death
Traps are tricky to make memorable. Luckily, the kinds of techniques that make succeeding on a trap memorable also make failing a trap memorable.
I like to think of Indiana Jones when designing traps into an adventure. In his action films you never imagine the benign voice of the DM saying: "Roll your check. You failed. Take 3d6 falling damage. Next?" Instead, traps are interesting things where many dangers occur at once.
The floor gives way exposing a yawning chasm beneath. Indiana desperately grasps out, catching the ledge (in our campaign, using some ability check). He suppresses a rush of vertigo at the sight of venomous snakes and vicious spikes below. As the rock crumbles under his weight, he tries desperately to pull himself onto the safety of a ledge (another check).
At this point, whether he succeeds or falls to his death, the scene is thrilling.
Die for a Cause
Dying for a cause is far more interesting than dying because the dice were cruel. Boromir's death in LOTR was memorable less because he took several arrows to the chest and more because it was an act of sacrifice and redemption in the ultimately unsuccessful cause of protecting the hobbits from capture.
Giving players something to die for is more about story crafting than encounter crafting. Like traps, stories that are already memorable can produce deaths that are memorable.
When designing your encounters, pair the greatest threats with the scenes and storylines of greatest importance. This reduces the chance that your characters die for something mundane or uninteresting. It also increases the respect they will have for the fallen. Your deadliest traps should protect things that have great meaning to your players. Your most powerful villains should pose a threat to the community that your players are willing to die for.
Require Respect, but not Somberness
My players had some good fun over the years teasing our rogue for his death-by-umber hulk, and our rogue bore the teasing with good humor. We have real life for funerals, so go ahead and let your players get back to the adventure right away.
It seems you desire simply that your players not kick their former allies' corpses while they're down and capitalize on their misfortune. You can accomplish all this without imposing an overly somber tone on the game.
Make sure you have a strategy to quickly onboard the replacement character so you can move on. In our campaign, every player has a spare character sheet that only requires the DM to roll a stockpile of equipment to be play-ready. The less time spent at the scene of death, the less time for players do get bored and abuse their fallen comrades.
I hope these tips work well for you. We've had some good success in our game using them. A good part of our success is having good players to play with, who have the same kind of game in mind. The rest comes from good ground rules and evocative story telling. Good luck!