I think that, even though it ends on a serious note, that this was one episode that could be considered a comedy.
You know how most TV series at some point try to do a light-hearted comedy of manners? I think of this episode as their comic-relief story.
Jayne, Kaylee-Simon, Book-River were all played strictly for humor for most of the show.
Even Zoe got in on the fun - "Is that Jayne? Is that really him? Wash, pinch me, I must be dreaming!"
The Captain, as usual, played the straight man.
You also got to hand it to Joss. Don't forget that this is a man who taught himself how to play music in six months so he could write the Buffy musical. He also wrote the theme song to Firefly and the laugh-outloud "Jayne's Song."