incorporating a distribution constraint in a minimisation objective For a given (convex) hypothesis $h \in \mathcal{H}$, and the variables $X \in \mathcal{X}$ and $Y \in \mathcal{Y}$ I have the following optimisation problem:
\begin{equation}
\min_{p(X,Y)} \int_{\mathcal{X}}\int_{\mathcal{Y}}p(x,y)\ell(h(x),y) \,dy \,dx
\\
\textrm{s.t.} \quad -p(X=x,Y=y) +\beta \leq 0, \quad   \forall (x,y) \in \mathcal{X}\times\mathcal{Y}, \beta>0 \\
\quad  \int_{\mathcal{X}}\int_{\mathcal{Y}}p(x,y) \,dy \,dx -1=0
\end{equation}
How I should incorporate the constraint $\forall (x,y) \in \mathcal{X}\times\mathcal{Y} $ in the objective to correctly form the Lagrangian? Is the following correct:
\begin{equation}
L(p,  \lambda)= \int_{\mathcal{X}}\int_{\mathcal{Y}}p(x,y)\ell(h(x),y) +\mu p(x,y) \,dy \,dx + \sum_{(x,y) \in \mathcal{X}\times\mathcal{Y}} \lambda_{(x,y)}(\beta -p(X=x,Y=y) ) - \mu
\end{equation}
Should the constraint be written as a double integral?

I would probably remove the lower bound constraint by noting that since all the probabilities are $\geq \beta$, I can optimize over the difference $p^*(x,y) = p(x,y) - \beta$ instead of over $p(x,y)$:
$$\begin{aligned}
\min_{p(X,Y)} \int_{\mathcal{X}}\int_{\mathcal{Y}}p(x,y)\ell(\cdot) \,dy \,dx &= \min_{p^*(X,Y)} \int_{\mathcal{X}}\int_{\mathcal{Y}}(p^*(x,y)+\beta)\ell(\cdot) \,dy \,dx \\
&= \min_{p^*(X,Y)} \int_{\mathcal{X}}\int_{\mathcal{Y}}p^*(x,y)\ell(\cdot) \,dy \,dx + C
\end{aligned}$$
where $C$ is a constant ($\beta$ times the integral of $\ell(\cdot))$ and can be ignored.
Now, with the constraint that $p^*(x,y) \geq 0$, which is natural in many approaches, you've satisfied the $\beta$ inequality automatically.  The "integrate to one" constraint then becomes
$$\int_{\mathcal{X}}\int_{\mathcal{Y}}p^*(x,y)\,dx\,dy = 1 - \beta\int_{\mathcal{X}}\int_{\mathcal{Y}}\,dx\,dy$$
which term on the right should be easily found.
