Its not about the fact that you die or how long you will live before you die. Its about whether you have lived an honorable life and whether you died for a worthy cause.
Here is a quote from a scroll written by Natori Masazumi in the 17th century. You can find it on page20 in “The Book of Samurai 1 – Fundamental Samurai Teachings“ by Antony Cummins and Yoshie Minami.
Chugi ni oite shi wo osorezaru kokoroe no koto – Preparing to be without fear of death in the name of loyalty
(I have changed a few words to better reflect the duty of a warrior in general, instead as in the original text specifically his duties within Japanese feudal culture. The original text is in brackets.)
For a man (bushi) it is essential to comprehend the following primary principle: as you have been born a protector (samurai) you must understand the difficulty of devoting and sacrificing yourself for the survival of your family (righteousness and loyalty) and you must value your name highly. The truth is, that protectors (Samurai) just like everyone else, have a fear of death. However if your understanding deepens it is not so difficult to enter death.
It is possible to die from illness, drowning, fire, to be killed in a moment of rage or even through lust. Even humble townsfolk and farmers can die such a death.
Of course, for those who are protectors (born into a military family) it is natural to die upon the field of battle. Therefore, if you are prepared fully for any destiny, be it glorious or ignominious, and if you are determined upon the above primary principle, then be aware that to die is not such a difficult act.