Let $X$ be a quasi-smooth Berkovich curve over a field of characteristic $0$ and let $mathscr{F}$ be a locally free $mathscr{O}_{X}$-module with connection. In this paper, we prove local and global criteria to ensure the finite-dimensionality of the de Rham cohomology of $mathscr{F}$. Moreover, we state a global Grothendieck-Ogg-Shafarevich formula that relates the index of $mathscr{F}$ in the sense of de Rham cohomology to the Euler characteristic of $X$ and expresses the difference as a sum of irregularities. We also derive super-harmonicity results for the partial heights of the convergence Newton polygon of $mathscr{F}$.