Speaking in an upcoming BBC documentary on mental health, William said that his time working as an air ambulance pilot gave him the impression that death was just "around the door," and the thoughts had become a problem until he spoke with someone.
William said the experience of loss brought him closer to "all those other people out there who have been bereaved," adding that "you can almost see [their loss] in their eyes."
"They want to talk about it, but they want you to go to first. They want you to say it's okay. They want to have your permission," William said.
He called for a change in how Britain approaches mental health: "We've got to relax a little bit and be able to talk about our emotions because we're not robots."
VIDEO: A look back at the life of Princess Diana
The comments were part of "A Royal Team Talk: Tackling Mental Health," a discussion about personal struggles that William shared with soccer stars Peter Crouch, Thierry Henry, Danny Rose, Jermaine Jenas and England's manager Gareth Southgate.
Prince William and his brother, Prince Harry, have championed the cause of addressing mental health issues, hoping their frank admissions on their own struggles will encourage others in need to seek help.
The brothers and their spouses recently banded together to back Shout, a text messaging service designed to help people with a wide range of problems including suicidal thoughts, relationship issues and bullying.
The Associated Press contributed to this report.