For a variety $X$ over a finite field, I guess one can take $\ell$-adic sheaves to replace differential forms. Then the local integral around a closed point $x$ (like integral over a little loop around that point) is the trace of the local Frobenius $\operatorname{Frob}_x$ on the stalk of sheaf, the so-called naive local term. Note that $\operatorname{Frob}_x$ can be regarded as an element (or conjugacy class) in $\pi_1(X)$, "a loop around $x$". The global integral would be the global trace map
$$
H^{2d}_c(X,\mathbf{Q}_{\ell})\to\mathbf{Q}_{\ell}(-d),
$$
and the Tate twist is responsible for the Hodge structure in Betti cohomology (or the $(2\pi i)^d$ one has to divide by). The Lefschetz trace formula might be the analog of the residue theorem in complex analysis on Riemann surfaces.

For the case of number fields, each closed point $v$ in $\operatorname{Spec} O_k$ still defines a "loop" $\operatorname{Frob}_v$ in $\pi_1(\operatorname{Spec} k)$ (let's allow ramified covers. One can take the image of $\operatorname{Frob}_v$ under $\pi_1(\operatorname{Spec} k)\to\pi_1(\operatorname{Spec} O_k)$, but the target group doesn't seem to be big enough). For global integral, there's the Artin-Verdier trace map $H^3(Spec\ O_k,\mathbb G_m)\to\mathbb{Q/Z}$ and a "Poincaré duality" in this setting, but I don't know if there is a trace formula. The fact that 3 is odd always makes me excited and confused.

So basically I think of trace maps (both local and global) as counterpart of integrals. Correct me if I was wrong.