It sounds like it could be a combination of things that could have provoked this reaction for your 6.5 year old. He could have be overwhelmed by the mistake itself (stuck in the mistake) and frustrated that he has to repeat the work already done.
Your son could have been overwhelmed by the scale of the task, not seeing a way to start the project (even with your suggestion).
I would have suggested at the moment, seeing his frustration, to chunk the task into smaller pieces. Ask him to pick up three of each kind and then ask for three more or if his brother was picking up the pennies, make a game out of it. Who can pick up the most coins in 1 minute. If neither of this ideas worked, I would get him to walk away from the situation and get a drink or complete another task to remove him from the emotion of the situation.
If the moment continues to be a problem and/or is a success, I would talk to him a little bit after the incident with him about how he was feeling, how he dealt with it and commending him about what he accomplished.
Thank you for your reply. It seems he was resisting to go to the accident spot by himself and he wanted someone to go with him.
Sounds like a great teaching moment to build confidence and how to handle adversity. If there is anything else I can help you with, let me know.