Not an precise answer : As far as I remember this is not really an issue. One has to replace by an other version of divergence theorem ( for less regular domain) using geometric measure theory . The key point I think is that the set where the nodal lines are not regular (often called the singular set $\{u=0\}\cap\{\nabla u=0\}$ is of dimension at most $n-2$ so it has measure 0 for the $H^{n-1}$ measure. But this is quite specific to solutions of elliptic pde and I don't think that smoothness is enough to guarantee any kind of regularity of the nodal set.
A more precise answer : Take a look (byfor example) at the proof of the nice Sogge-Zelditch formula which precisely uses this type of div theroem (formula (8) in the paper).