Facebook has apologised over its Year in Review feature after some users complained about the images chosen to sum up their 2014.
Eric Meyer described the feature as "jarring" and "wrong" after he logged on to discover a picture of his six-year-old daughter, who had died earlier in the year, was selected.
The photo album, which is automatically generated, includes photo uploads and wall posts that received the most "Likes" over the past 12 months.
Facebook say it is looking at ways to improve the app to prevent similar incidents from happening again.
In a blog Meyer wrote: "I know, of course, that this is not a deliberate assault.
"This inadvertent algorithmic cruelty is the result of code that works in the overwhelming majority of cases.
"The Year in Review ad keeps coming up in my feed. There wasn't enough thought given to cases like mine or anyone who had a bad year.
"The design is for the ideal user, the happy, upbeat, good-life user. It doesn't take other user cases into account."
Jonathan Gheller, product manager for Facebook, told the Washington Post that the social network site had been in touch with Mr Meyer.
Gheller said: "[The Year in Review feature is] awesome for a lot of people, but clearly in this case we brought him grief rather than joy."
Facebook has also seen complaints from users after pictures of deceased pets and an urn containing human remains were selected as "highlights" of the year.
Writer, Julieanne Smolinski, uploaded one of the images automatically chosen to select her best bits of 2014, a picture of her ex's house on fire.
She wrote: "So my (beloved) ex-boyfriend's apartment caught fire this year, which was very sad, but Facebook made it worth it."
The photo album, which users could personalise before sharing also ended with the caption, "See You Next Year!"
Facebook, which boasts 1.35 billion monthly active users, was launched in 2004.
The company also owns WhatsApp and Instagram.