This is probably a very easy question, but I'm stuck at it for hours now. In what follows, $\mathcal{B}(\mathbb{R})$ is the space of all bounded Borel measurable functions on $\mathbb{R}$. Let $\mathcal{H}$ be a Hilbert space, $A$ a bounded self-adjoint operator on $\mathcal{H}$ and $\psi \in \mathcal{H}$ be fixed. By Riesz-Markov Theorem, there exists a measure $\mu_{\psi}$ on $\sigma(A)$ (the spectrum of $A$) such that: $$\langle \psi, f(A)\psi\rangle = \int_{\sigma(A)}f(\lambda)d\mu_{\psi}(\lambda) $$ for every continuous function $f$ defined on $\sigma(A)$. Thus, if $g\in \mathcal{B}(\mathbb{R})$ we can define $g(A)$ by the rule: $$\langle \psi, g(A),\psi\rangle = \int_{\sigma(A)}g(\lambda)d\mu_{\psi}(\lambda)$$ for every $\psi \in \mathcal{H}$. The polarization identity allows us to obtain $\langle g(A)\psi,\phi\rangle$ from the above identity. If $T_{\psi}$ is a bounded linear operator $T_{\psi}:\mathcal{H}\to \mathcal{H}$ given by $\phi \mapsto T_{\psi}(\phi) := \langle g(A)\psi, \phi\rangle$, then, by Riesz Representation Theorem there exists $\varphi \in \mathcal{H}$ such that: $$T_{\psi}(\phi) = \langle \varphi, \phi \rangle $$ for every $\phi \in \mathcal{H}$. Thus, we may define $g(A):\mathcal{H}\to \mathcal{H}$ as the linear map satisfying: $$g(A)\psi := \varphi$$
Question: $g(A)$ is linear by construction but how can I prove it is bounded? Also, using only the above construction, if $g$ is real valued, does it follow that $g(A)$ is self-adjoint?
You can define $\mu_{\phi,\psi}$ by the Riesz-Markov theorem analogically (i.e. as the measure corresponding to $f \mapsto \langle f(A)\phi, \psi\rangle$). We have $$|\langle f(A) \phi, \psi\rangle| \leq ||f||_\infty ||\phi|| \;||\psi||.$$ Hence, $||\mu_{\phi,\psi}|| \leq ||\phi|| \; ||\psi||$. Note that this measure is actually the polarization of measures $\mu_\phi$ and $\mu_\psi$.
Now fix $g \in \mathcal{B}(\mathbb{R})$. We have $$|T_\psi(\phi)| = \left| \int_{\sigma(A)} g(\lambda) d \mu_{\phi,\psi}(\lambda) \right| \leq ||g||_\infty ||\mu_{\phi,\psi}|| \leq ||g||_\infty ||\phi|| \; ||\psi||$$ and so $||T_\psi|| \leq ||g||_\infty ||\psi||$. Finally $$||g(A) \psi|| = ||\varphi|| = ||T_\psi|| \leq ||g||_\infty ||\psi||$$ which proves that $||g(A)|| \leq ||g||_\infty$.
For your second question, we first show that $\mu_\phi$ is a nonegative measure. This holds as for each nonnegative $f \in C(\sigma(A))$ we have that $f(A)$ is positive. Hence, $$\int_{\sigma(A)} f d\mu_\phi = \langle f(A)\phi,\phi \rangle \geq 0.$$
Now for real valued $g \in \mathcal{B}(\mathbb{R})$ we have $$\langle g(A)\phi,\phi \rangle = \int_{\sigma(A)}g d \mu_\phi \in \mathbb{R}.$$ Hence $g(A)$ is self-adjoint.