Trott is the third England cricketer to leave a tour in recent years citing mental health issues, following Marcus Trescothick in 2006/7 and Michael Yardy in 2011 and Farmer praised the players for going public with their illnesses.
He hopes the South African-born batsman's actions go some way to encouraging other individuals to confront similar problems with no fear of repercussions.
"Professional sports people can find themselves under enormous pressure and may worry about speaking out in case they appear weak," Farmer said.
“Encouragingly we have seen a number of cricketers speak out about their mental health in recent years, which helps dispel the myth that mental health problems are something to be ashamed of.
“We hope this helps others open up about how they are coping and seek help if they need it.”
England coach Andy Flower said that he and Trott made a "joint decision" that the player should return home to England soon after the close of play on the third day of the first Test last weekend.
In a statement announcing his decision to leave Trott cited mental health concerns and said: "I don't feel it is right that I'm playing knowing that I'm not 100% and I cannot currently operate at the level I have done in the past.
"My priority now is to take a break from cricket so that I can focus on my recovery. I want to wish my team-mates all the very best for the remainder of the tour."