I had a similar issue with my eldest when she was about that age. It was though a switch would get thrown without warning and she'd completely melt down. Her melt-downs (crying, screaming, etc) could last literally for hours. The doctors were clueless. And just as unexpectedly as it had begun it would end, hours later, and my sweet kid would return.
I second the suggestion to examine diet, as it can have a profound effect on behavior, but I also believe that during this age (my son is there now) they seem to get overwhelmed more easily than previously. I don't know what it is about the age, but that is my experience. With my daughter we tried being firm and we tried being comforting, but in fact all kinds of interaction just made her escalate. It was though any added stimulation ratched up her distress. I was at my wits' end and ignoring it was as ineffective as everything else--she'd just following me screaming. *sigh*.
As unorthadox as this sounds, what I finally did was to put her in her room and put up the pressure gate. I calmly (everything from me was calm, BTW, whether the firm things or the comforting ones--I tried very hard not to act as frazzled as I felt) told her that when she was done screaming that she could come out and we would talk.
The first time, she screamed for an hour. Then again, she would have screamed at *least* that long following me around the ouse, too, so I wasn't sure if it made any difference. But the next time she only screamed for 30 minutes (a huge leap from the intitial 3 hours--I'm not exaggerating, I did time them). The time after that it was 5 minutes, and after that (for about the next 3 months or so) when she felt herself losing control she would ask me to put her in her room behind the gate!
Go figure! What she needed was as little extra stimulation as possible and the time and space to find a way to calm herself down. She did that in the safety of her room, and as soon as she regained control she came out and we'd have hugs, talk if she wanted, and go on with the day. To this day she sometimes volunarily goes to her room and closes the door when she feels she's getting too overwhelmed.
This is NOT a recommendation for all kids--my son is just the opposite and needs to be held for about 20 minutes or so when he gets overwhelmed--leaving him in his room would just intensify his distress. But for my eldest is was just the thing. I'm sure that you, too, will find a way to help him cope with his overwhelming emotions. Good luck--dealing with the prolonged melt-downs can be as hard on you as it is on them!