Samuel Butler (1612-1680) wrote "Tis better to have loved and lost than never to have lost at all" from 'Way of All Flesh' - Tennyson ( 1809-1892) wrote "Tis better to have loved and lost than never to have loved at all" from 'In Memoriam'. Looks like a bit of plagiarism, even in those days!
Ah, Cetti - who's plagiarising who? According to my sources, Samuel Butler (1835 - 1902) was an English composer, novelist, & satiric author, whose autobiographical novel "The Way of All Flesh" was published posthumously in 1903.
You're right Kit - I've just checked in the Penguin book of Quotations, there were two Samuel Butler entries together - I took the dates from the earlier one. That's one up to you!