To add to Barry's c ommentary. . yes, it matters. But only if you believe in a resurrection. Life ends, but the Bible says it's a sleep, to be reawakened to either heaven or permanent destruction.
One cannot help but think, when asked this question, of people who struggled unbelievably to cling to life, to save another, or even died on a battlefield so others might live.
Our lives, which have personal liberty and self-determination, were bought and paid for by the lives of others. The things I hold dear were paid for by others.
My ability to have an afterlife was purchased by God in person becoming mortal and dying of His own free will.
Does my life have meaning? Yes, it does. It held great meaning for those who died on the beaches with names like Omaha, for those who survived it, too. It kept the fight alive at Valley Forge during a bad winter. It gave meaning and ever after purchased the unbuyable during the civil war... Eventual equality for all of the human race. Yes, all these were done with an eye for the future, for those not yet born, and for those living at the time.
So if I make nothing of it, if I fail to honor the lives and believe in the importance of the lives who come after me... It my curse, it is my damnation should I waste my life, or fail to give respect for, and protect those lives of the future.