I have a big issue regarding the equality of integrands in gauss law. Given the integral form we have that $$\oint_{\partial\Omega}\vec{E}\cdot\vec{dS}=\int_{\Omega}\nabla\cdot \vec{E}dV={1\over \epsilon_0}\int_{\Omega}\rho \ dV$$
Here in this link https://physics.stackexchange.com/questions/23190/where-is-the-flaw-in-deriving-gausss-law-in-its-differential-form it says that we can conclude that $$\nabla\cdot \vec{E}={1\over \epsilon_0}\rho$$ because the equality of integrals is valid for all region $\Omega$ of the space.
But how can we $\mathbf{formally}$ prove this result? so we can formulate the next theorem:
Let $f,g:\mathbb R^3 \to \mathbb R$. Let $\Omega$ be any arbitrary region in $\mathbb R^3$ suppose that $$\int_{\Omega}f=\int_{\Omega}g$$ then $f=g$
Know even if this theorem holds, the second problem is that the region in gauss law is a closed region (becuase we use the divergence theorem) so my second question is that if the theorem would also be true just for closed regions?
I would really appreciate if you can help me with this problem