In an apparent reference to South Korea's high suicide rate, he also warned of the "culture of death" that can pervade rapidly developing countries where the poor are marginalised.
It was the pope's first public event following his arrival in Seoul yesterday, which nuclear-armed North Korea marked by firing a series of short-range rockets into the sea.
A capacity crowd had crammed the World Cup stadium in Daejeon, some 160 kilometres south of Seoul, hours before the pope arrived to conduct the mass.
During the mass, Pope Francis offered a special prayer for the victims and their families, and urged Koreans "united in grief" to work together for the common good.
More From This Section
Before the mass, he held a brief private audience with some of the relatives, and agreed to baptise the father of one of the student victims at the Vatican embassy in Seoul on Saturday.
The ferry tragedy has largely been blamed on a culture of regulatory negligence, fuelled by the drive to place profit over safety.
He also spoke of the "cancer" of despair that can permeate societies where surface affluence hides deep inner sadness.
"Upon how many of our young has this despair taken its toll," he said.
It was a message designed to resonate not just with South Koreans, but other emerging Asian nations where decades of rapid economic growth have thrown up stark social challenges.
Trees lining the streets leading to the stadium were tied with the yellow ribbons that have become the memorial symbol for those who died on the Sewol ferry.