。
It's painful to go on living once you've realized that you yourself are a failure.
Literal
Self [subject-が] failure [copula-である] [quotative-と] notice-[past-た] [state-まま] live-[continuing-ていく] [nominalizer-の] [topic-は] painful [thing-こと] is-[copula-だ].
A bleak observation about self-condemnation. ~まま ('in/remaining in the state of X') attaches to past-attributive verbs or adjective-nouns to mark continuation in a state — 'while still X.' 気が付く ('to notice, to realize, to become aware') is the standard verb for sudden awareness. である is the formal copula in its attributive form, linking できそこない as a predicate inside the quotative と. ~ていく captures the forward motion of continued living. レッテルを貼る ('to slap a label on') is the cousin metaphor — once you've labeled yourself a failure, going on living under that label becomes a slow, draining burden.