I would like to find a function $z(y)$ which maximizes the expression $$\big(y - p\,z(y)\big)\left(\alpha z(y) - \int_a^b z(y)f(y)\,dy\right),$$ but I am not too sure how to go about this.
My approach was to substitute $z(y)$ with $z(y) + c\phi(y)$, where $c$ is a constant and $\phi(y)$ is an arbitrary function, so that the expression becomes $$\big(y - p\,\big(z(y) + c\,\phi(y)\big)\big)\left(\alpha (z(y) + c\,\phi(y)) - \int_a^b (z(y) + c\,\phi(y))f(y)\,dy\right).$$
Now I differentiate with respect to $c$ to obtain $$-p\,\phi(y)\left(\alpha (z(y) + c\,\phi(y) - \int_a^b (z(y) + c\,\phi(y))f(y)\,dy\right) + \big(y - p\,\big(z(y) + c\,\phi(y)\big)\big)\left(\alpha\,\phi(y) - \int_a^b \phi(y)f(y)dy\right).$$ For an extremum, this must be equal to zero at $c = 0$, so $$-p\,\phi(y)\left(\alpha\,z^{*}(y)- \int_a^b z^{*}(y)\,f(y)\,dy\right) + \big(y - p\,z^{*}(y)\big)\left(\alpha\,\phi(y) - \int_a^b \phi(y)f(y)dy\right) = 0,$$ or equivalently $$\phi(y)\left(\int_a^b z^{*}(y)\,f(y)\,dy + \alpha\,y - 2\alpha\,p\,z^{*}(y)\right) - \big(y - p\,z^{*}(y)\big)\int_a^b \phi(y)f(y)dy = 0.$$ This has to be true for any function $\phi(y)$ and here is where I get stuck.
Perhaps it may help if the distribution is $Uniform[0, 1]$, so that $f(y) = 1$.
Notes: $f(y)$ is a probability function, $y\in[a,b]$ with $b>a>0, \; p>0,\; z(y)\ge 0$ and $y-pz(y)\ge 0.$