Summation Formulas and Beyond Endoscopy