You shouldn't put yourself down.
Ted has a girlfriend and is going through a rough time in life.
Ted wants to cope with his suffering.
Ted starts telling himself that he can overcome these difficulties to encourage him to put out effort.
Ted keeps telling himself that he is a worthless person and can't do anything right as a way of explaining his suffering.
Ted's girlfriend admires Ted more for pushing through difficulties proactively.
Ted's girlfriend gets fed up with Ted's lack of self-esteem and leaves him.