Imagine that now you are in a desert. In front of you there is an aquarium with a fish. You are very thirsty and hungry. The question is: If you drink the water and eat the fish you will be alive and have the energy to find a nearer village. If you do not eat and drink you will not see the sun anymore. You cannot just drink half of the water in the aquarium. And if you leave the fish in the desert, the water will evaporate and the fish will eventually die. What will you do?
As a Buddhist, I understand that my life is unimportant if I compare it with the lives of others. I will, therefore, leave the fish and the water alone out of compassion for the fish, another living being. As you know, the Bodhisatta sacrificed his life many times before he became the Buddha. I too can sacrifice my life and hope to become a Bodhisatta some day.
We cannot say, "It is only a fish." If the fish dies because of my selfishness, my bad kamma increases. If I die and save the fish, I have developed understanding and will progress along the spiritual path. Of course, yours is an extreme example, but we can show selflessness and compassion in our daily lives in many ways. By the good merits accrued within this life, you are building protection for yourself for this life and the next.