Foster is out of action after undergoing ankle surgery in September, but Ferguson has urged the England international to look at Gary Neville.
Neville was out of action for 15 months before returning this season.
“Ben is the most talented young keeper we have had for a long time and what the boy needs now is a slice of luck,” Ferguson told the Daily Mirror.
“But if he feels the fates are against him he should look at Gary Neville.
“When you consider the fact he has been plagued with injuries, he’s done brilliantly to come back so convincingly.
“He is a role model for any player feeling down on his luck with injury.”