If there is no hope of an afterlife, all is hopeless.
If all is hopeless, ultimate despair is the right attitude.
Ultimate despair is not the right attitude.
So there is hope of an afterlife.
I will argue for 1 and 3. If there is no hope of an afterlife, any redeeming value we might hope for is overshadowed by the ultimate evil of both the end of our individual lives and of the human race. But despair is not the right attitude, since despair makes it impossible for us to live our moral lives, both in terms of the motivation to pursue the good and in our duty to comfort others. Despair saps our motivation. And faced with ultimate hopelessness, any comfort we might offer to others is insincere and dishonest. In despair at ultimate hopelessness, we could only live the good human life through self-deceit and the deceit of others. But that is not right. So ultimate despair cannot be the right attitude as it makes the good life impossible.