The norm involving the inner product of the first derivative shall be associate with the Sobolev norm for the space $W^{1,2}(\Omega)$, in which the elements and their weak derivative are both $L^2$-integrable. And as you mentioned in the comment, the fact that having constant plugging in would make the inner product be zero makes the induced "norm" only a semi-norm, we denote it as $|\cdot|_{W^{1,2}(\Omega)}$
So Here what we wanna do is to find $X$ such that this semi-norm behaves the same as the full $W^{1,2}(\Omega)$-norm on $X$, ie, we want to quotient the kernel of $\nabla$ out to get an equivalence class $W^{1,2}(\Omega)/ \mathbb{R}$, there are normally two ways to do this:
For every element $u\in W^{1,2}(\Omega)$, consider the new space for $\displaystyle \bar{u} = u - \frac{1}{|\Omega|}\int_{\Omega} u $, and we have $\displaystyle \int_{\Omega} \bar{u} = 0$, naming this equivalence class as space $\mathring{H}^1(\Omega) = X$, then by Poincaré inequality, for any $w\in \mathring{H^1}(\Omega)$: $ \|w \|_{L^2(\Omega)}\leq C\|\nabla w \|_{L^2(\Omega)} $ hence $ |w |_{W^{1,2}(\Omega)} \leq \|w \|_{W^{1,2}(\Omega)}\leq(1+ C)|w |_{W^{1,2}(\Omega)} $ we have the norm equivalence, and this construction is normally associated with the Pure Neumann problem for the second order elliptic PDEs.
Another construction is we set the boundary value to be zero like $H^1_0 = X$ like you said, and use Friedrichs' inequality(Poincaré inequality's counterpart for zero-trace functions), we could get the same norm equivalence relation above whereas the geometry constant $C$ might be different. This space relates to the Dirichlet problem for Poisson equation.
We also could have a mixed version of above two which associates to the following problem $ \left\{ \begin{aligned} -\Delta u &= f &\text{ in } \Omega \\ u &= g &\text{ on } \Gamma_D\subset \partial \Omega \\ \nabla u\cdot \boldsymbol{n} &= g_N &\text{ on } \Gamma_N\subset \partial \Omega \end{aligned} \right. $ Define the space $X = H^1_{g}(\Omega) = \{u\in H^1(\Omega): u = g \text{ on } \Gamma_D\}$, if the Dirichlet boundary is not empty, $|\cdot|_{W^{1,2}(\Omega)}$ is a norm too.