https://en.wikipedia.org/wiki/Riemann_zeta_function
There are several methods to define finite sums for divergent series. See the wikipedia article for a comprehensive list:
https://en.wikipedia.org/wiki/Divergent_series