I think the calculation of any set of circumstances/prerequisites for throwing ones life away would require too much... well calculation. I can say I would die for a cause that if unachieved, would mean a life not worth living, but that requires it's own set of calculations, like, at what point do I give up hope? What if I die for nothing and could've been more useful at some other point. The only way I could see myself taking this route is if I'm certain that I am going to die anyway.
I can see myself trading my life for others, but that would depend on a circumstance that would satisfy my sensibility. At what point does one say "fuck it" and do something like that without thinking, that is a probe-ier question.
Trolly problem, I can either save one important man or 100 infants, I perform some quick maths and throw myself at the point before the fork in the tracks to save myself from having to choose.