Oh, yes, I'm right there with you!
My son is six and over the past few months, when he's gotten himself into trouble with us (usually the same situation where a warning was given then the consequence)-- I do hear the "I'm so stupid. I'm dumb. I wish I wasn't alive."
YES, high, high drama! I try to empathize and restate: "You know, you aren't stupid, but you are mad at yourself for making a wrong choice." or "Sweetie, I think you are mad at yourself because you are embarrassed that you got carried away and didn't listen. Do you want to go (make amends- if appropriate)?" or "I felt the same way when I was a kid. I'd get in trouble and be so mad at myself/embarrassed that I wished no one could ever see me again."
By the way, I don't see this as a bid for attention, necessarily, but as a kid asking for reassurance because he is very angry with himself for choosing to continue on after being told not to. He is becoming more aware that he does have failings. Kids at this age want to be perfect.
So, yeah, I think it's fairly common for a kid at this age to have some negative self-talk. We can boost them up by giving positive feedback when they've done the correct thing, made a good choice, etc. to help balance that out. I do have to say, when I heard a friend talking about her 6 year old girl doing this a couple years ago, I was *very* concerned-- now I know that this is just par for the course for some kids. So, yeah, keep on providing some balance....
I'm certain we'll be commiserating when 8 or 9 rolls around and we start getting the "Whatever!" with an eye roll..... NOT looking forward to that!