This question is exactly what brought out of a suicidal depression, to theism, and eventually Christ. I don't claim to have hard answers, but I hope I can offer some things to consider, about hedonism, nihilism, and objective vs subjective reality.
What is the purpose? Is there a purpose? Is there a purpose for you and not for me?
Death is almost certain, so why are we alive? What is the purpose for life if we all die?
Maybe there is no purpose. Well, if so, then why ask questions, why seek understanding? Why ask why? It's futile. If there is no purpose, why do we hold ourselves subject to any standard of living? Do as you please, or not, it doesn't matter.
But I bet my life on the fact that one day I will die. And when you contemplate your own mortality, your own limitations, it makes you think differently. By the way, why is it that we creatures can imagine the wildest of things but cannot effectively make our imaginations reality? It is with great effort that we do so. Therefore, I am a constrained, dying man. The clock is ticking.
Is truth a virtue? Is morality a virtue? Are there any virtues? The world I live in seems to indicate this to be the case. I cannot go living out my life however I please, because the forces of the world will demand that I be virtuous, or else I will suffer undesirable consequence. Retaliated against or locked up. There is also the logical absurdity of trying to live an unvirtuous life. If I succeed at being unvirtuous, then I am at least a man of consistency and integrity (which seems virtuous to me). And if I'm only haphazardly virtuous, then why do I sometimes do things that are virtuous? Therefore, trying to live an absolutely immoral life, is not possible. Can hedonism then be the answer?
I appeal to my intuition and senses. I appeal to the evidence before me. I appeal to that which requires the least assumptions. Put another way, I take the "Evidence to the Best Conclusion". My knowledge is incomplete, I can always ask more questions, but my life is a gamble. I know I will die most certainly, but what if anything is next? So, I bet on truth by weighing the evidence, appealing to my senses, appealing to a notion of "common-sense". I wrestle often to be sure I really know, but 100% is not necessary to live.
Therefore, I generally accept that things that comfort, rest, peace, wealth, love, and truth are all generally good things to seek for me, and for you as well.
Suppose you believe that live has a purpose, I sure do! Then for what purpose? What is the ultimate purpose you can live for? Your own pleasure? You will die. The pleasure of your children? They will die too one day. The pleasure of the multitudes of generations that will come? They will also die (for that is the safest assumption, it has been for millions of years). This line of thinking brings me to think in the other direction. Instead of asking "what will be my purpose?", I began to ask, "for what purpose was I made?"
If death is guaranteed, and if there is a purpose, I conclude my legacy and purpose are defined by the afterlife, if there is such as thing.
I'll leave with two more thoughts to ponder:
If I accept the narrative of the Big Bang, I am left to ponder what caused it. To me, the evidence points to a timeless, immaterial creative force. I lack the details of knowledge, but this begins to look like what I would call a "God".
The second is a quote:
“Let us eat and drink, for tomorrow we die.”
I know this from the biblical literature. The authors of the new testament letters, Paul specifically, believed that if Christ was dead, then there was no afterlife.