Is $V=\lbrace u\in H^1(\mathbb{T}^N):\int u(x)dx=0\rbrace$ dense in $ H^1(\mathbb{T}^N) $?. My attempt: take$u\in H^1(\mathbb{T}) $ and $u_n$ a sequence in $(C^\infty\cap H^1)(\mathbb{T}^N)$ s.t. $u_n\rightarrow u$ in $H^1(\mathbb{T}^N)$-norm. Then define $v_n=u_n-\frac{1}{|\mathbb{T}^N|} \int u_n $. Clearly, $v_n\in V$ and also converges to $u$ in $H^1$-norm, because $\nabla v_n =\nabla u_n\rightarrow \nabla u$ in $L^2$ and by the classical periodic Poincare-inequality $ \Vert v_n-u\Vert_2\leq C \Vert \nabla v_n-\nabla u\Vert_2\rightarrow 0 $.
So my question is wheteher am I wrong or not. Thanks in advance!
Note that this result cannot be true because, as noted in the comments, convergence in $H^1(\mathbb{T}^N)$ implies convergence in $L^1(\mathbb{T}^N)$ and hence if $u_n \in V$ and $u_n \to u$ in $H^1(\mathbb{T}^N)$ then $$0 = \int u_n dx \to \int u dx$$ and so $u \in V$ also. This shows that $V$ is a closed subset of $H^1(\mathbb{T}^N)$ which is not equal to $H^1(\mathbb{T}^N)$ and hence is not dense.
The mistake in your argument is that in order to apply the classical periodic poincare inequality (as stated in the question you link to in the comments) to $v_n - u$ you need that $v_n - u \in V$. Since $v_n \in V$, this means that you'd have $u \in V$ also. This means that your argument only works if $u \in V$ and not for general $u \in H^1(\mathbb{T}^N)$. Note that this agrees with the first part of my answer.