Prince William has urged athletes to "talk about the mental wellbeing" of both sportspeople and fans, as he believes it is "vital".