Prince Harry has praised competitors at the Invictus Games for their part in turning the issue of mental health "from a sad story to an inspiring one".
He was speaking in Sydney at the closing ceremony of the games, founded to celebrate the sporting achievements of injured service personnel.
"The secret to the success of these Games has been accepting that mental health is the real key to recovery."
Everyone could be inspired by the "Invictus example", the duke said.
About 500 competitors from 18 nations took part in the games, which involve 11 adapted sports.
The Duke of Sussex said the athletes taking part had fought back from "some of the darkest experiences known to anyone".
"By simply being here and fighting back... you have become role models for everyone at home or in the stands who might be struggling with a mental illness."
"Most importantly, you are showing us all that it's OK to ask for help."
Prince Harry referenced his own struggles following the death of his mother, Princess Diana.
"I've been there, you've been there, and we now need to reach out to those who can never even imagine themselves in that place."
The Duke and Duchess of Sussex attended the ceremony as part of their 16-day tour of Australia, New Zealand and the South Pacific.
It comes a year after the couple made their first official public appearance at the Invictus Games in Toronto, in 2017.
The royal couple applauded the athletes as they paraded into the stadium at Sydney Olympic Park to mark the end of the eight-day event.
While he praised the courage, determination and "mateship" of the competitors, the duke said the success of the games was ultimately about "ordinary people doing extraordinary things".
"You do not have to be a veteran who has fought back from injury to be inspired by the Invictus example," he said.
He added that mental wellbeing was more important than physical fitness because "without it, we cannot survive, let alone thrive".
"When you accept a challenge is real, you can have hope. When you understand your vulnerability, you can become strong. When you are brave enough to ask for help, you can be lifted up. You can start living, doing, feeling - not simply surviving.
"And when you share your story, you can change the world.
"I can't think of a better way to continue serving your country," he said.
In an earlier speech, the duchess paid tribute to the "strength of spirit" of the athletes she had met at the games, such as Ryan Novak - a US serviceman who had been paralysed from the waist down and told he would never walk again.
With the "unwavering support" of his mother, Mr Novak recovered sufficiently to compete in sailing, swimming and athletics at the Sydney games
"When Harry and I saw him at the finish line of the sailing, he literally jumped into our boat - with dexterity and ease, by the way - to give both of us a hug," she said.
Meghan called the games - founded by Prince Harry in 2014 - "an international platform of some of the best athletics and sportsmanship you could ever witness, coupled with a camaraderie and close-knit sense of community which can only be defined as the Invictus Spirit".
The duke, who served in the Army for 10 years, started the games in London four years ago, with the aim of helping wounded service personnel and veterans with their physical and psychological rehabilitation.
He concluded his speech in Sydney on Saturday by thanking all those involved in creating the 2018 event.
"I am so proud to call you my friends and my Invictus family. You are the Invictus generation and you are showing us all that anything is possible.
"Thank you to everyone for an amazing Sydney Games - we'll see you in the Netherlands in 2020."