What our purpose in life is, is hard to know. I sometimes think we serve no purpose, or even if there is a heaven or hell. This may be all there is, but maybe not. Logically it seems impossible for there to be any kind of afterlife other than re-incarnation. Once dead we will never be able to return to let others know if there was a purpose. We can only guess.
A Prayer under the Pressure of Violent Anguish by Robert Burns
O THOU Great Being! what Thou art,
Surpasses me to know;
Yet sure I am, that known to Thee
Are all Thy works below.
Thy creature here before Thee stands,
All wretched and distrest;
Yet sure those ills that wring my soul
Obey Thy high behest.
Sure, Thou, Almighty, canst not act
From cruelty or wrath!
O, free my weary eyes from tears,
Or close them fast in death!
But, if I must afflicted be,
To suit some wise design,
Then man my soul with firm resolves,
To bear and not repine!