Let $h$ be defined by $h_i = \frac{1}{\sqrt{2}^i}$. Then you have $M = \{ y| \langle y, h \rangle = 0 \}$. Since the functional $y \mapsto \langle y, h \rangle$ is continuous, it follows that $M$ is closed. It should also be clear that $M$ is a subspace, and $M^\bot = \text{sp} \{h \}$.
Hence any $x$ can be decomposed as $x = \lambda_M h + x_M$, where $x_M \in M$. If $y \in M$, we have $\|x-y\|^2 = \|\lambda h + x_M-y\|^2 = |\lambda_M|^2 \|h\|^2 + \|x_M-y\|^2$. If we choose $\hat{y} = x_M$, then we have $\|x-\hat{y}\|^2 =|\lambda_M|^2 \|h\|^2$, and $\|x-\hat{y}\| \leq \|x-y\|$ for all $y \in M$. So the solution to the problem is $\hat{y} = x_M$.
To compute $x_M$, we need $\lambda_M$, which can be obtained from $\langle x, h \rangle = \langle \lambda_M h + x_M, h \rangle = \lambda_M \|h\|^2$, then $\hat{y} = x_M = x-\lambda_M h = x- \frac{\langle x, h \rangle}{\|h\|^2}h$.
Details (for the original) follow:
$\|h\|^2 = \sum_{i=1}^\infty h_i^2 = \sum_{i=1}^\infty \frac{1}{2^i} = 1$. $\langle x, h \rangle = \sum_{i=1}^\infty x_i h_i = \sum_{i=1}^\infty \frac{1}{2 i} \frac{1}{\sqrt{2}^i}$. From the Taylor series for $x \mapsto -\ln (1-x)$ for $|x|<1$, we obtain $-\ln(1-x) = \sum_{i=1}^\infty \frac{x^i}{i}$, and hence $\langle x, h \rangle = -\frac{1}{2} \ln (1-\frac{1}{\sqrt{2}})$. Thus, $\hat{y} = x+\frac{1}{2} \ln (1-\frac{1}{\sqrt{2}}) h$.
Here are the details for the updated question:
$\langle x, h \rangle = \sum_{i=1}^\infty x_i h_i = \sum_{i=1}^\infty \frac{1}{2^i} \frac{1}{\sqrt{2}^i} = \sum_{i=1}^\infty \frac{1}{(2\sqrt{2})^i} = \frac{1}{2\sqrt{2}-1}$. Then, $\hat{y} = x- \frac{1}{2\sqrt{2}-1}h$.