Tennyson's best friend from college, Arthur Henry Hallam, died suddenly in 1833. They had known each other and been friends for only six years, but Tennyson mourned him for the rest of his life, spending seventeen years working on a long elegiac poem, In Memoriam A.H.H. to honor Hallam. The much shorter "Break, Break, Break," which was probably written in 1834 and then published in 1842, is also about his friend (source).
Tennyson named his son Hallam after his dead friend, even though the boy wasn't born until nineteen years after Arthur Henry Hallam's death (source).