Extension of Bochner-Lichnérowicz formula on spheres