I have a function: $f = \max(0,1-\frac{A}B) $, where $B$ is known, $A$ is a normal random variable $N(\mu,\sigma)$ with expected value of $\mu$ and standard deviation of $\sigma$.
What I need is a closed formula for the expected value of $f$ depending on $B$:
$$E[f|B]$$
What is clear is that without uncertainty $f$ reaches $0$ when $A=B$, so left from that point the determined $f=0$.
I have an image of this function, what I'm looking for is the expected value of the grey dots.
Or having just the $f$ function alone:
As you can see I chose $B$ to be around $1$ and I have the parameters for $A$ as $\mu=1$ and $\sigma=0.05$.


Let's say $B>0$, then $f=1-A/B$, when $A<B$ and $f=0$, otherwise, hence \begin{align} \int_{\mathbb{R}}\max(0,1-\frac AB)dF(A)&=\int_{-\infty}^{B}(1-\frac AB)\frac{1}{\sqrt{2\pi}\sigma}\exp\{-\frac{(A-\mu)^2}{2\sigma^2}\}dA \end{align}
One may write the latter integral in terms of the Error function.