Macbeth's words from Act V, Scene 7, allude to Shakespeare's other play, Julius Caesar, in which Brutus and Cassius who killed themselves with their own swords in the moment of defeat. For the Romans, this was a death that was nobler than being taken captive and tortured and/or killed by one's enemy. Ever the warrior, Macbeth vows to fight to the end, saying that as long as there are men alive, he will try to kill them, not himself:
... Whiles I see lives, the gashes
Do better upon them. (5.8.2-3)
Macbeth's statement, too, continues the motif of blood and brutality prevalent in this drama. Truly, it is a heart of darkness that owns Macbeth's every thought and action. For, even as he faces defeat, he vows to inflict injury and death upon whomever he can before he dies.
At his entrance in Act V Scene 8, after he has killed Young Siward, Macbeth says:
Why should I play the Roman fool, and die
On mine own sword? whiles I see lives, the gashes
Do better upon them.
In a sense, this statement suggests that while there is life, there is hope. At this point in the play, Macbeth still thinks he bears a charmed life as he cannot be slain by one of "woman born". It is only a few lines later that Macbeth discovers that Macduff was not born of woman but "untimely ripped" from his mother's womb (i.e. what we would now call a Cesarean section).
The immediate reference is, as stated above, to Brutus who commits suicide in defeat. Although the Roman philosophy of Stoicism considered suicide a valid choice under certain circumstances, Shakespeare, his audience, and his characters were Christians for whom suicide would count as a mortal sin. Even though Macbeth knows that he is probably condemned to eternal damnation, he still can hope for redemption after a long time in Purgatory if he does not commit suicide, and by forcing Macduff to become a regicide, he can hope that Macduff will also suffer after death.