Light aircraft flying in the UK no longer needs a CAA class two medical.
There are options whereby the standard required for driving cars is the standard required for recreational flying.
Your friend's flying club will be able to provide the options available given his mental health issues.
Discussion with his GP would also be appropriate to ensure that all the bases are covered.
Following the German wings, you will understand why mental health issues are in the forefront of the regulator's considerations as to fitness to fly.