When my DD10 was about 5, everything she said seemed to be connected to self-criticism. "I'm stupid" "it's horrible" "I can't do anything" etc etc. I was pretty sure it was related to perfectionism, but I was torn between that or attention seeking behaviour. I just didn't know. I'd calmly address each statement, eg:
her: I'm stupid
me: I don't think you are
her: it's horrible
me: I like it. I think you did a fine job
her: I can't do anything
me: sure you can, like (list examples)
After I laid the foundation of my countering opinions, I simply stopped responding to her negative statements. She outgrew it, thank heavens. I honestly have no idea if the way I handled it had any impact.
Good luck... it's tough, I know.