There are a few famous funeral dirges. "Funeral March" by Chopin
is the one commonly heard on cartoons. A number of funeral marches
are heard in Purcell's "Funeral Music for Queen Mary." Handel's
"Dead March" is also used a lot at funerals. Thomas Attwood wrote a
march titled "Dirge" for Admiral Nelson's funeral.
I hope one of these is the one you're looking for. You can hear
samples of all of these at Amazon, CD Universe, etc.