Step 1: Evaluate the Gradient of \( \varphi \).
We first compute the gradient of the function \( \varphi = \frac{1}{2}(x^2 + y^2 + z^2) \):
\[
\nabla \varphi = (x, y, z).
\]
Step 2: Use the Divergence Theorem.
The given surface integral is of the form \( \int \int_S \hat{n} \cdot \nabla \varphi \, dS \), which by the divergence theorem becomes a volume integral of the divergence of \( \nabla \varphi \). The divergence of \( \nabla \varphi \) is:
\[
\nabla \cdot \nabla \varphi = 3.
\]
Step 3: Apply the Divergence Theorem.
The volume of the unit sphere is \( \frac{4\pi}{3} \), so the value of the surface integral is:
\[
\int \int_S \hat{n} \cdot \nabla \varphi \, dS = 4\pi.
\]
Final Answer:
\[
\boxed{4\pi}
\]