Derivative of equation containing Gaussian filtered image
You can represent the convolution as a matrix multiplication with a $N\times N$ Toeplitz matrix, where $N$ is the length of $\mathbf{w}$. Check out this explanation.
So you can write
$$
E(\mathbf{w})=\frac{1}{2}\|\mathbf{AHw}+\mathbf{b}\|^2_2
$$
where $\mathbf{H}$ is your Teoplitz matrix filter. Now if you define
$$
\tilde{\mathbf{A}} = \mathbf{AH}
$$
then
$$
E(\mathbf{w})=\frac{1}{2}\|\tilde{\mathbf{A}}\mathbf{w}+\mathbf{b}\|^2_2
$$

And you can see that the solution is exactly as you wrote but with $\tilde{\mathbf{A}}$ instead of $\mathbf{A}$.