i think everyone is a little too focused on the envy part
she was certainly envious but i feel like it was further exaggerated to a crazy degree seeing her in the casket, and that was because their relationship was so good this became almost like a coping mechanism.
"she's so pretty in her casket" + "I don't want her to die" = "how is she so pretty, i want her to become uglier, oh no she really did become pretty and leave me"
at the bottom of it they had a genuinely good relationship and this girl is really grieving her best friend's death