One verse

Srimad Bhagavatam 6.10.33

6.10.33

द्वौ सम्मताविह मृत्यू दुरापौ यद् ब्रह्मसन्धारणया जितासु: । कलेवरं योगरतो विजह्याद् यदग्रणीर्वीरशयेऽनिवृत्त: ॥ ३३ ॥

dvau sammatav iha mrtyu durapau yad brahma-sandharanaya jitasuh kalevaram yoga-rato vijahyad yad agranir vira-saye ’nivrttah

dvau
two
sammatau
approved (by sastra and great personalities)
iha
in this world
mrtyu
deaths
durapau
extremely rare
yat
which
brahma-sandharanaya
with concentration on Brahman, Paramatma or Parabrahma, Krsna
jita-asuh
controlling the mind and senses
kalevaram
the body
yoga-ratah
being engaged in the performance of yoga
vijahyat
one may leave
yat
which
agranih
taking the lead
vira-saye
on the battlefield
anivrttah
not turning back

There are two ways to meet a glorious death, and both are very rare. One is to die after performing mystic yoga, especially bhakti-yoga, by which one can control the mind and living force and die absorbed in thought of the Supreme Personality of Godhead. The second is to die on the battlefield, leading the army and never showing one’s back. These two kinds of death are recommended in the sastra as glorious.