The death of an officer haunted by a double murder and other traumatic events should be a lesson for police on how to prevent future tragedies, a coroner says.