I mean, it's obviously played for laughs. But also the circumstances are neither explained, nor apparently thought-out much (like—if we are going to approach this seriously, as something beyond the black humour gag strip aspect—why does she self-destruct dramatically and dangerously (and also thereby violating the first law) instead of just shutting down or something, plus the second chapter makes no sense unless those laws of robotics were mistranslated somewhere; the precedence of the second and third of Asimov's laws are well enough thought-out and don't create a conflict in that situation, etc).
And there are some crucial questions to be answered about some of the not-addressed bits, if we wanted to get down to hard facts, and objectively evaluate whether this is a tragedy: We have no idea what happens when she explodes. We have no idea where her intelligence is housed or whether it's proof against explosions. It's implied that she "dies", yet it's also implied that it's the same girl both times. Without resolving that I can't see it as necessarily a tragedy, even if I take everything seriously.