Why is Beatrice happy to die in Nathaniel Hawthorne's "Rappaccini's Daughter"?
Beatrice is mortified when Giovanni accuses her of having deliberately entrapped him and turned him into a poisonous being like herself. When he exhales into a cloud of little bugs and twenty of them fall, dead, to the ground, she realizes what her father has done. Rappaccini has wrought his "mortal science" on Giovanni in order to give his daughter a companion. Upon this realization, Beatrice cries to Giovanni, "'Yes; spurn me! -- tread upon me! -- kill me! Oh, what is death, after such words as thine? But it was not I! Not for a world of bliss would I have done it!'" She is eager to prove her innocence, to impress upon Giovanni, the man she loves, that she would never have sought to manipulate him or corrupt his body in this way. He has spoken to her so harshly that death seems like a blessing to her.
Further, when Giovanni presents her with the vial of potion mixed by Baglioni, the potion which he's been promised will rid the poison from his system, she happily drinks it on one condition: she says, "'I will drink -- but do thou await the result.'" She seems to intuitively know that this potion will have a deleterious effect, and so she drinks it, perhaps knowing it will kill her, to save Giovanni's life and to prove that she would rather die than to harm him.
Beatrice is happy to die at the end of "Rappaccini's Daughter" because she feels the pain of having been born poisonous. She has long endured the solitude that her father, a scientist, created for her, but she has felt worse about being alone since the arrival of her beloved Giovanni. Knowing that she can never be with him because she is poisonous has made her increasingly feel the harshness of her fate.
As she is dying she tells her father that she would have rather been loved than feared, and she is happy to die because the memory of her father's evil actions will pass away from her after her death. She also recalls the cruel words of Giovanni, in which he tells her that she has made him as deadly and hateful as herself. Death will also make her forget his cruelty, and she wants this release.