We had an issue similar to this in science. DD9 wasn't yelling (yet), but was not getting along very well with her classmates. DD was grouped with about 3-4 other students during this subject and it just wasn't working out. DD did not mention any issues to us at home, but science happened to be her lowest grade. When I asked about science DD said she just didn't like it. Her teacher told me when they broke into groups DD ended up doing most of the work and was getting frustrated. After the teacher realized what was going on, she allowed DD and one other "bright" student to work together as their own little group instead of working in the larger group. I overwhelmingly thanked the teacher for being so observant and taking care of the issue before it became a problem.
I agree we can try to teach our children to be patient and monitor their emotions with appropriate responses when they have situations like this, but if all it takes is a change in groups or some other fairly simple solution, then the responsible person in charge, i.e. teacher, needs to make that call. They can't assume an 8 year old will be able to fix the problem or always maintain composure. In our case the teacher took control and fixed what was wrong. Good job "teach" - problem solved!