Why does Anderson laugh hysterically after Sherlock leaves?
In "The Empty Hearse" (Season 3, episode 1) the following occurs:
Anderson (abruptly stopping crying and looking round): Hang on.
(He stands up and walks over to his wall of papers.)
Anderson: That doesn’t make sense.
(Behind him Sherlock rolls his eyes and quietly sighs with an exasperated sound.)
Anderson: How could you be sure John would stand on that exact spot? I mean, what if he’d moved?
(Sherlock turns and quietly leaves the room.)
Anderson (oblivious to his departure): Hey – how did you do it all so quickly? What if the bike hadn’t hit him? (Suspiciously) And anyway, why are you telling me all this? (He chuckles.) If you’d pulled that off, I’m the last person you’d tell the truth ...
(Turning around, he trails off when he realises that he’s alone in the room. He stares for a moment, then chuckles. He switches between looking at all his paperwork and looking to where Sherlock had been standing.)
Anderson (quietly, sounding amused): Sherlock Holmes!
(He chuckles again, pointing to the spot where Sherlock had just been standing.)
Anderson (even softer, with a combination of amusement and exasperation): Sherlock!
(His chuckle slowly develops into laughter, and then into hysterical laughter as he starts tearing at the papers on the wall, ripping them off and whooping and giggling. Eventually he collapses in the corner, rising up onto his knees to continue clawing at the papers and still laughing hysterically until he slumps back down again.)
(Transcript from https://arianedevere.dreamwidth.org/44665.html)
Why does Anderson react in this way?
It's not entirely clear but it's likely that Anderson has finally realised that, despite all the wild theories created to explain the "death" of Sherlock Holmes either by himself and/or the rest of the Empty Hearse group he founded, he will never know the truth.
LAURA: I don’t see why not. It’s just as plausible as some of your theories. (Behind her, the walls of the room are absolutely covered with notes, photographs and Post It notes. Pieces of red string link some of the paperwork together, some of the strings even crossing the room. Laura is not the only person in the room with Anderson – six or seven others are squeezed onto the furniture. At least three of them are wearing deerstalker hats, and one is wearing a Sherlock-like coat and scarf.)
ANDERSON: Look, if you’re not going to take it seriously, Laura, you can ... (He makes a ‘get out’ gesture.)
LAURA (angrily): I do take it seriously. (She looks disapprovingly around at the others.) I don’t think we should wear hats.
ANDERSON: I founded ‘The Empty Hearse’ so like-minded people could meet, discuss theories ...
Even when Sherlock himself turns up and "explains" how he pulled it off, Anderson can't or won't believe it's true (assuming it is, which is by no means guaranteed).
All his theories have come to nothing and he's been wasting his time. Consequently, he destroys all the elaborate theories pinned to the wall and breaks down... slightly!
LESTRADE: A bungee rope, a mask, Derren Brown. Two years, and the theories keep getting more stupid. How many more’ve you got for me today?