Shakespeare treats death as a tragic circumstance in Romeo and Juliet; more to the point, he uses tragic deaths to make some very important moral claims. His main point is to assert the immorality of allowing one's self to be guided purely by irrational, intense, passionate emotions rather than by the rational mind.
We especially see Shakespeare's moral point asserted in Prince Esacalus's brilliant lines found in the final scene:
See what a scourge is laid upon your hate,
That heaven finds means to kill your joys with love!
And I, for winking at you, discords too,
Have lost a brace of kinsmen. All are punish'd. (V.iii.302-06)
In these lines, Prince Escalus is laying the blame for all tragic deaths in the play on Lords Capulet and Montague and the unfounded, uncontrolled hatred they feel for each other. As the prologue points out, even though the feud between the two families was a longstanding one, it had been laid to rest for years, but the present generation Lords Capulet and Montague had decided to rehash the old grudge. Therefore, the hatred they feel for each other is a perfect example of irrational, intense, passionate emotions, and as we see, it causes fights, whole-city brawls, duels that lead to deaths, and even the need to marry secretly, which leads to further deaths. Hence, Prince Escalus is perfectly right to place the blame for all the tragic deaths in the play on Lords Capulet and Montague.
If we juxtapose the irrational behavior of the two lords in the play against more sensible dramatic foils, like Benvolio, we further see Shakespeare's point to refer to uncontrolled emotions as immoral. Unlike other more emotionally driven characters in the play, Benvolio is much more calm, sensible, and rational; he is especially even a peacemaker. We see an example of his rationalism and peacekeeping intentions in the very first scene in which he tries to break up the fight between the two households' servants, saying, "Part, fools! / Put up your swords. You know not what you do" (I.i.59-60). We also see his rationalism when he tries to advise Romeo to forget about Rosaline; although, Romeo refuses to listen. Since Benvolio is both one of the few rational characters in the play and one of the few characters that do not die, we can clearly see how Shakespeare used this dramatic foil to underscore his point that irrational, uncontrolled emotions are immoral and lead to severe consequences, such as tragic death. And if this point is investigated further, you might see that the deaths, including Mercutio's, Romoe's, and Juliet's, at least for the most part, are a result of these characters' own irrational, violent, passionate, uncontrolled emotions.
In the story, Romeo and Juliet, Shakespeare has sympathised the deaths of Romeo and Juliet through their last conversations. He has displayed more of emotions at their death. We can easily compare mercutio's death to Romeo. Romeo commits suicide whereas Mercutio gets killed by Tybalt. At this point Romeo is more infuriated at Tybalts action than the loss of his friend. That is why instead of mourning at his friend's loss, he hurries to challenge and kill Tybalt. Shakespeare has made this scene short and brief.
When Romeo dies, Shakespeare has used very emotional language and the scene is rather longer than that of Mercutio. At Tybalt's death Shakespeare shows not much of mercy in the play. When Juliet kills herself too, Shakespeare has used so much of sympathy and emotion in the dialogues to catch the readers attention.
The most important reason that Shakespeare has sympathised the deaths of Romeo and Juliet is that he wanted to potray that "love is blind" and people could sometimes even give up their life for someone.