This is a sad song and is sung to a melancholy melody. It's been done countless times and there is even a CD with different versions of it that I'd like to get. I first heard an Irish version of it, maybe done by Tommy Makem and The Clancy Brothers, many years ago. I memorized it then and would sing it at the top of my lungs while driving.
Here's a great version by Doc Watson. [This version is gone from youtube and I haven't found one near as good. When I do I'll put the link here again.]
THE UNFORTUNATE RAKE
As I was a-walking down by St. James' Hospital,
I was a-walking down by there one day,
What should I spy but one of my comrades
All wrapped up in flannel though warm was the day.
I asked him what ailed him, I asked him what failed him,
I asked him the cause of all his complaint.
"It's all on account of some handsome young woman,
'Tis she that has caused me to weep and lament.
"And had she but told me before she disordered me,
Had she but told me of it in time,
I might have got pills and salts of white mercury,
But now I'm cut down in the height of my prime.
"Get six young soldiers to carry my coffin,
Six young girls to sing me a song,
And each of them carry a bunch of green laurel
So they don't smell me as they bear me along.
"Don't muffle your drums and play your fifes merrily,
Play a quick march as you carry me along,
And fire your bright muskets all over my coffin,
Saying: There goes an unfortunate lad to his home."