The group of automorphisms of the function fields of the curve \(x^n+y^m+1=0\) Cohomology of Drinfeld modular varieties. Part II: Automorphic forms, trace formulas and Langlands correspondence. With an appendix by Jean-Loup Waldspurger 