1) a voluntary Act
2) done as a rejection of Hope and of the Life God has given you.
To sacrifice yourself to save another or others is totally different. Many saints have been canonized for such sacrifices. many knowing that their actions would result in them being killed by others, or by nature...
Saint Gianna Beretta Molla, died after giving birth to a child, when she could have had an operation to save her life, but that would have killed her baby. She knowingly made the choice t give up her own life rather than risk her unborn babies life.
Her specific medical situation would be unlikely to re-occur in the West were modern medicine can now save the lives of both in her situation, but many many women do suffer from far more serious types of Gynicological problems, including the Fibroids that caused Gianna's death. in serious cases they can still threaten Life due to hemorrhage during or after child birth.
My own wife put her health on the line every time we choose to get pregnant. While our medical care makes any rsk to her life very very low, it is still there.
Another example would be someone who goes out into a dangerous environment : like a severe storm to save a person or group: and puts his own life on the line.
But your example, of "X situation will kill many people. I can perform Y act, and save them all, but if I do Y, I will be unable to escape with my own life- in fact my method will directly, violently end my own life"
While the Asteriod example of X and Y is from science fiction, the example of a soldier diving on a grenade is very comparable. It is Self Sacrifice - NOT suicide.