Substitute Concrete Value in Conditional Expectation 
*

*Let $(\Omega, \mathcal{G}, \mathbb{P})$ be a probability space.

*Let  $$ X, Y : \Omega \rightarrow \mathbb{R} $$ be random variables.

*Furthermore, let
$$ f: \mathbb{R}^2 \rightarrow \mathbb{R} $$
be a $\mathcal{B}(\mathbb{R}^2)/\mathcal{B}(\mathbb{R})$-measurable function 
such that, for all $y \in \mathbb{R}$, the random variables $f(X,y)$ and 
$f(X,Y)$ have finite expectation.


Now let $y \in \mathbb{R}$ be arbitrary. Under the above assumptions, the expected value $\mathbb{E}[f(X,y)]$  and a $\mathbb{P}$-unique conditional expectation $\mathbb{E}[f(X,Y) \mid Y]$ do exist. 
Furthermore, since $\mathbb{E}[f(X,Y) \mid Y]$ is $\sigma(Y)/\mathcal{B}(\mathbb{R})$-measurable, there exists a $\mathbb{P}_Y$-unique $\mathcal{B}(\mathbb{R})/\mathcal{B}(\mathbb{R})$-measurable function
$$ \varphi : \mathbb{R} \rightarrow \mathbb{R} $$
such that $\varphi(Y) = \mathbb{E}[f(X,Y) \mid Y]$.
Under which circumstances does it hold, that $\varphi$ can be chosen such that
$$ \varphi (y) = \mathbb{E}[f(X,y)]  $$
and why?
Thanks in advance for any advice!
 A: $\newcommand{\R}{\mathbb{R}}
\newcommand{\vpi}{\varphi}$
The answer is: the condition 

$E(f(X,Y)|Y)=\vpi(Y)$ for all $f$ such that $f(X,Y)$ has a finite expectation 

holds iff $X$ and $Y$ are independent. 
Indeed, if $X$ and $Y$ are independent, then for each Borel subset $B$ of $\R$
\begin{align*}
 EI\{Y\in B\}\vpi(Y)&=\int P(Y\in dy)I\{y\in B\}\vpi(y) \\ 
 &=\int P(Y\in dy)I\{y\in B\}Ef(X,y) \\ 
  &=\int P(Y\in dy)I\{y\in B\}\int P(X\in dx)f(x,y) \\ 
  &=\int P(X\in dx,Y\in dy)I\{y\in B\}f(x,y) \\ 
  &=EI\{Y\in B\}f(X,Y),
\end{align*}
where $I$ is the indicator. So, $E(f(X,Y)|Y)=\vpi(Y)$. 
Vice versa, suppose that $E(f(X,Y)|Y)=\vpi(Y)$ for all $f$ such that $f(X,Y)$ has a finite expectation, where $\vpi(Y)=Ef(X,y)$ for all real $y$. Take any Borel subsets $A$ and $B$ of $\R$, and let $f(x,y):=I\{x\in A\}I\{y\in B\}$ for all real $x,y$. Then for each $y\in\R$
\begin{equation}
\vpi(y)=Ef(X,y)=EI\{X\in A\}I\{y\in B\}=P(X\in A)I\{y\in B\} 
\end{equation}
and 
\begin{align*}
P(X\in A)P(Y\in B)&=EP(X\in A)I\{Y\in B\} \\ 
&=EI\{Y\in B\}\vpi(Y) \\ 
 &=EI\{Y\in B\}f(X,Y) \\
 &=EI\{X\in A\}I\{Y\in B\}=P(X\in A,Y\in B),
\end{align*}
so that $P(X\in A,Y\in B)=P(X\in A)P(Y\in B)$. 
A: This isn't an answer, just a (hopefully correct and useful) reformulation of the question
Let $f$ be as stipulated (and assumed fixed throughout). The equation $E(f(X,Y)|Y) = u(Y)$ is just a way of saying that $u$ satisfies
$$
\int f(x,y)\psi(y)dP^{X,Y}(x,y) = \int u(y)\psi(y)dP^Y(y)
$$
for all $\psi$ in a suitably large class of test functions. The question here is under what circumstances is the function $u$ defined by
$$
u(y) =\int f(x,y)dP^X(x)
$$
a solution to all these equations. That is, when is it true that 
$$
\int\int f(x,y)\psi(y)dP^{X,Y}(x,y)  = \int \left(\int f(x,y)dP^X(x)\right)\psi(y)dP^Y(y)
$$
for all test functions $\psi$? Re-arranging this equation slightly, our question becomes: when is it true that 
$$
\int \int \psi(y)f(x,y)\left( dP^{X,Y}(x,y) - dP^X(x)dP^Y(y)\right) = 0
$$
for all test functions $\psi$?. 
Edit: I don't disagree with anything in Iosif's answer, but my initial feeling (before you accepted his answer) was that you were asking a slightly different question. Whether anything interesting can be said for my question is perhaps a matter for another occasion.
