The thing about grief and bereavement is that people who have never experienced a significant bereavement just don't understand it - you think you do but you don't.
@Snowdrop89 that you need to understand that when someone is grieving their emotions are all over the place.
Anything - and I literally mean anything - may provoke a bad reaction if you get someone at the wrong time. Sending stuff in the post is particularly dangerous because a person opens it without warning
for the future , I would say if you are thinking of sending something like that to a bereaved person, you should mention it gently first to see if it would be welcome and so that if it is, they have advanced warning - and when you send it tell them.
I think in this case if your friend wanted to frame her poem and her photo she could do it herself. It's probably nothing more than you shocked her when she opened it and it set off a grief wave.
As for what to do now, I think you need to acknowledge what she has said, apologise and tell her that you are there for her. If possible, I'd speak to her rather than send a message in writing.
I'm grieving now and it's a strange time. The slightest thing can set you off so don't take it personally - but like I said, the lesson here is you need to be very tender with grieving people because they are so raw and so vulnerable. A nice comment about the deceased can be like a knife in the heart if it comes at the wrong moment.