I am currently studying about the divergence theorem in a vector-calculus class. This is a pure-mathematics class but we do not study the relevant concepts in the fully generalized differential-geometry setting. The way the divergence theorem was presented to us is as follows:
Given a "smooth" open set $U\subseteq \mathbb{R}^n$ (a set where we can define an outwards-pointing normal vector on the boundary), and a vector field $F$ defined on $U$, then: $$\int_{\partial U}outwardFlux(F)=\int_Udiv(F)$$ In addition, we were told that this can be thought of as a generalization of the fundamental theorem of calculus when $n=1$, since in that case, $div(F)=F'$, and the left-side integral simply becomes $F(b)-F(a)$ when $U=(a,b)$. However, this requires a definition of an integral on a $0$-dimensional manifold, which isn't something we defined properly (we only defined integral on $1,...,n-1$ dimensional manifolds using charts).
I know that a $0$-dimensional manifold is simply a discrete set. How can an integral be defined on such a set? Is there a general definition of an integral on a manifold that can generalize nicely into $0$-dimensional manifolds? I am asking because I want to understand how the divergence theorem is a generalization of the fundamental theorem of calculus.
Yes, you first need to generalize integration to mean something more than you see in, e.g., Riemann integration of a function on an interval.
Let's try and motivate why we are doing this. The naive way of thinking about integration on $\mathbb{R}$ is that, for every interval $[a,b]$, there is some map $\int_a^b$ that takes an integrable (we will not restrict ourselves to specific integration theories here) function $f\colon [a,b]\to\mathbb{R}$, and outputs a real number $\int_a^b f$. There are various laws this satisfies, such as additivity, multiplication by constant, monotone. There are two important conditions here for later generalizations
(There are further generalizations you could make, e.g. we take all linear combinations of intervals instead of just $\pm 1$ of a single interval in algebraic topology, but that is another topic for another day.)
Now we generalize this notion to higher dimensions. On rectangles (in general, cuboids): integration on an oriented $n$-cuboid $[a_1,b_1]\times\dots\times[a_n,b_n]$ takes "integrable functions" to a number satisfying, in particular, the $n$-dimensional volume $$ \operatorname{volume}([a_1,b_1]\times\dots\times[a_n,b_n])=\int_{[a_1,b_1]\times\dots\times[a_n,b_n]}1=\prod_{i=1}^n(b_i-a_i). $$ Now what about $n=0$? This formula says $$ \operatorname{volume}\left(\prod_{i\in\varnothing}[a_i,b_i]\right)=\prod_{i\in\varnothing}(b_i-a_i) $$ and empty product of real numbers is conventionally defined to be $1$ (one justification: $\prod_{i\in I\amalg J}a_i=\prod_{i\in I}a_i\times\prod_{i\in j}a_i$ has to make sense even when $J=\varnothing$), and empty product of sets is a single point. So integration on a $0$-dimensional cuboid (i.e., a single point) is then the sign from orientation multiplied by the function value at the point.