So I think you might have some errors. So $u(x,y,t) = 0$ will not make sense unless both $f(x) = g(x) = 0$. Also, are you solving over the whole of $\mathbb{R}^n$? Are you just solving over some domain $D$ and the boundary data is specified just for that domain? I'll assume now that you are trying to solve the 2D wave equation $u_{tt} = \Delta u$ with $u = f$ on $\partial D$ and $u_t = g$ on $D$ at $t=0$.
With this, let's take you idea to consider two solutions $u_1,u_2$ and look at $w = u_2 - u_1$ and define
$$E(t) = \iint_D w_t^2 + |\nabla w|^2 dx dy$$
So differentiating under the integral sign we have
$$E'(t) = 2\iint_D w_tw_{tt} + \nabla w \cdot \nabla w_t dxdy$$
An important identity is Green's First Identity which tells
$$\int_{\Omega} \nabla \psi \cdot \nabla \phi dV = \int_{\partial \Omega} \psi \nabla \phi \cdot \nu dS - \int_{\Omega} \psi \Delta \phi dV$$
where $\Omega \subset \mathbb{R}^n$ and $\nu$ is the outward surface normal. The $dS$ integral is a surface integral. Thus from this we have
$$\iint_D \nabla w \cdot \nabla w_t dxdy = \iint_{\partial D} w_t \nabla w \cdot \nu dS - \iint_D w_t \Delta w dxdy$$
(so we have taken $\psi = w_t$ and $\phi = w$). The boundary term will disappear since $w = 0$ on $\partial D$ and so $w_t = 0$ on $\partial D$ so we have
$$E'(t) = 2\iint_D w_tw_{tt} - w_t \Delta w dx = 2 \iint_D w_t(w_{tt} - \Delta w) dxdy = 0$$
So we see that $E(t)$ is constant and
$$E(0) = \iint_D w_t^2(x,y,0) + w_{x}^2(x,y,0) + w_{y}^2(x,y,0) dxdy$$
We have $w(x,y,0) = 0$ thus, $w_x(x,y,0) = w_y(x,y,0) = 0$ and also we have $w_t(x,y,0) = 0$ thus, $E(0) = 0$. So we conclude that $w_t = \nabla w = 0$ and so we conclude $w = 0$ on $D$ and therefore $u_1 = u_2$.