We prove several index theorems for holomorphic self-maps having positive-dimensional fixed points set. To do so we show that the fixed points set of a holomorphic self-map has a surprisingly rich structure, expressed by canonically defined meromorphic connections and bundle maps. Finally, we present some applications to holomorphic dynamics