Consider someone who doesn't believe in any kind of reincarnation or perfect punishment after death, an atheist. That is, nothing in the world can impact him/her after his/her death, because, as he/she believes, he/she will completely ceasing existing.
Is it possible for a person like this to be optimistic in the sense of leaving a better world for future generations? If so, how?
I don't see what could prevent this hypothetical person from being selfish all his/her life, knowing that the burden will exist only for future generations and not for himself/herself.