In which poem did Tennyson write "Tis better to have loved and lost, Than never to have loved at all"?

History Trivia: In which poem did Tennyson write "Tis better to have loved and lost, Than never to have loved at all"?