I just snapped at my professor

So I (18f) go to a small college in my hometown, we have about 20 in my English class and today was my first day back after being off since last week when my grandfather died. Mind you I did email all my professors when he died just to let them know I wouldn’t be there so it wouldn’t be held against me (plus, I needed to figure out how to make up my in class work). Okay well I come in today and he hands out a poem to analyze. This is what he puts on the table. I immediately start crying, while he’s reading the poem. He then turns the conversation over to the class and one student said “I think that people who are facing a loss can find comfort in this.” My friend who is sitting next to me looks at me and I started shaking my head and then my teacher asked me if I had something to add. And as a matter of fact I sure did. I told him that this poem was awful, I just lost my grandfather and I actually hate this poem, and that I was angry that the other student would think something like that. The second to last stanza was my main complaint. My teacher looked stunned and my friend just sat there smiling like “yeah girl, pop off.” Everyone else was to stunned to say anything. I feel bad, I was just really bad timing.