I am re-reading Colin Wilson's easily book Religion and the Rebel (1957) which begins with an autobiographical essay describing the period of his teens and early twenties when it seemed to him that every human life was a failure - and his own determination not to fail.
I can remember feeling almost exactly the same way - and indeed I think it is an almost inevitable perspective for any reflective atheist who sees human life purely in terms of mortal life - and excludes the possibility of a pre- and post-mortal life.
The basic problem with all mortal lives is death - and that is why from a purely mortal perspective all lives must be seen as a failure.
Because when mortal life is all there is, then there can no 'right time to die'.
Death either leaves unfulfilled the potential of early promise, or cuts-short achievement at its peak, or else it comes after achievement has declined - and after a period of dwindling, suffering, dependence...
This leads to the temptation of suicide (or indirectly engineering one's own death) among those who wish their life to make a satisfying trajectory and whole, by timing their own death.
(This, for instance, seems to have been a Samurai ideal, and is also found among Western 'Romantics' of the past couple of centuries.)
Well, that is the theory - but if we are honest with ourselves - at a gut level a life terminated by suicide does not really strike us as a success; even a calm or a more-or-less calculated suicide such as Arthur Koestler and his wife's suicide pact; or an indirectly by self-engineered demise like Lawrence of Arabia killed by habitually reckless driving, or the multitude of those who die of 'accidental' alcohol or drug overdoses in a context of deliberate addiction.
So, from a secular perspective, all biographies are tragedies of one sort or another; all lives are (more, or less) wasted.
So, when is a life not a failure? The answer is that some lives are a success when considered from the context of eternity. If we take a step back from mortality, we see that mortal life looks very different.
From the perspective of a believer in pre- and post-mortal life, mortal life is a finite episode in an unmeasured 'eternity' coming both before and after. Such a period is of extraordinary significance, however it turns-out - and at least some human lives can be seen as extremely positive in their nature and achievement.
Indeed, it may well seem that many, perhaps most, human lives have been successful in these eternal terms - in other words, success in life is that we are in a better situation at the end of our mortal existence than we were at its beginning.
Of course, by this account, failure is also possible; which is why success from an eternal perspective is an objectively meaningful evaluation - and not merely a matter of sticking-on an arbitrary 'success' label.