Deputy inspector Carlos Court says 26-year-old Simon Venegas was chatting with his former girlfriend when he pointed his camera at a tree in a courtyard of his house.
Court says Venegas hung a rope over a branch and told his ex, "Watch what I'm going to do" and "I love you, take care," before hanging himself.
The horrified 23-year-old woman called Venegas' friends to stop him, but Court says they arrived too late. The couple broke up a year ago.
The suicide happened Friday in San Felipe, about 90 kilometers (55 miles) southeast of the capital of Santiago. Police announced it Sunday.