It is so foreign to me that I routinely mess up. And she is 9. At 4, she told me that I should let her work through it and don't try to help her. Just tolerate her outbursts. Since the rest of the family is noise and emotion sensitive and thrown off by her displays, she has been routinely sent to her room where she flops on her bed and wails. It is not an effort to avoid the task, it is usually tasks she loves, like piano. "I'm pressing the right keys but the piano is playing the wrong notes."
Or when a shoe falls on her foot, "Help, I'm stuck". This annoys me no end because all she needs to do is move her leg and she can get up, but it happens time and time again, even though we ignore it and then praise her after she works through it.
That sounds very familiar. We mostly ignore DD when she gets like this and let her work through it herself. This happens a lot with puzzles and she'll ask me to do it for her (when I know full well she can do it herself) so we just tell her to keep trying and she'll figure it out and then praise her hard work afterwards.
Actually, even yesterday this happened. She found a big bucket and wanted to do all these crazy things with it so we just let her at it. There were some tears shed along the way because the bucket wasn't behaving but eventually she got through it.
Basically, we try and figure out if she's upset because a.) she's hurt b.) she wants attention or c.) she's frustrated because she can't figure out something. For a.) and b.) we help her out but for c.) we let her work through it but might give some words of encouragement.
ETA: I just saw herenow's post and agree. Physical touch can help too. We'll also rub DD's back sometimes too or give her a kiss but without helping with the actual problem at hand.