Tennyson's poem is a retelling of a part of the plot of Shakespeare's Measure for Measure.
In that play, Mariana
is engaged to the hypocritical Angelo. She thinks he loves her, but he only wants to marry her for money. When her brother's merchant ship is lost at sea, Mariana loses all her money. Once she is penniless, Angelo abandons her and breaks their engagement. Mariana becomes depressed and isolates herself in a house surrounded by a moat.
In the poem, she becomes increasingly desperate. At the end of the first stanzas she says the refrain about wishing she were dead; by the final stanza, she is weeping it:
She wept, "I am aweary, aweary,
Oh God, that I were dead!"
Tennyson liked to write about isolated women. Mariana is at the mercy of a wicked man, but in the end, she is able to take a more active part in the plot, tricking Angelo into bed with her so that he has to marry her.
Tennyson's poem also inspired a famous painting by Millais about Mariana, that is a fine depiction of her weary isolation: https://www.tate.org.uk/art/artworks/millais-mariana-t07553