Macbeth's famous soliloquy should not be interpreted as an expression of Shakespeare's personal view of life and death; it expresses the character's feelings as he nears the end of his own life. Macbeth's sense of futility is overwhelming, certainly, as he sees life as "[S]ignifying nothing."
Shakespeare, however, depicts life and death through other characters, as well, with far different expressions of feelings and philosophies. For some, life is seen as an opportunity to act with honor and to die for a good cause. For instance, after Macbeth has been defeated, Siward receives word from Ross that Young Siward, his beloved son, has been killed in battle, standing his ground and dying "like a man." Young Siward's wounds were "on the front," indicating that he had faced death and fought with courage. Siward takes comfort in his son's bravery and sacrifice:
Why then, God's soldier be he!
Had I as many sons as I have hairs,
I would not wish them to a fairer death:
And so his knell is knolled.
Siward's view of life and death is quite different from Macbeth's. His son, now "God's soldier," had lived and died with honor; his life and death were not without meaning.