Analysis on Kähler and Lorentzian manifolds