The study looked at feelings of worthlessness, unhappiness, sleepless nights, and being unable to face problems. The researchers also accounted for numerous factors known to affect well-being, including income, having children, moving house or job, and relationship changes.
Lead researcher Adam Martin, from UEA's Norwich Medical School, said: "Our study shows that the longer people spend commuting in cars, the worse their psychological well-being. And correspondingly, people feel better when they have a longer walk to work."
Mr Martin said the study's finding that commuters felt better when travelling by public transport, compared with driving, was "surprising".
"You might think that things like disruption to services or crowds of commuters might have been a cause of considerable stress.
"But as buses or trains also give people time to relax, read, socialise, and there is usually an associated walk to the bus stop or railway station, it appears to cheer people up."
The UK Faculty of Public Health welcomed the findings of the study, published in the journal, Preventive Medicine.
It said streets that were for people, rather than cars, promoted neighbourliness and helped everyone to have happy communities.