The question is not well posed, as it is not quite clear in what terms you want $C(f)$ to be expressed. If one only uses the terms you did mention -- the Lipschitz constant and the size of the domain, then no finite $C(f)$ exists. Indeed, suppose that the domain, of "size" $a\in(0,\infty)$, is $[0,a]^2$. Take any real $c>0$ and let \begin{equation} f(x,y):=\max(0,c-|y-x|) \end{equation} for real $x$ and $y$. Then $f$ is $1$-Lipschitz, the left-hand side of your inequality is \begin{equation} \text{lhs}:=\Big(\int f(x,x) dx\Big)^2=c^2a^2, \end{equation} and the double integral on the right-hand side of your inequality is \begin{equation} \begin{aligned} \text{rhs}&:=\iint f(x,y)^2\,dx\,dy \\ &\le\int_0^a dx\,\int_{-\infty}^\infty dy\,\max(0,c-|y-x|)^2 \\ &=\int_0^a dx\,\int_{x-c}^{{x+c}} dy\,(c-|y-x|)^2 \\ &=2\int_0^a dx\,\int_0^c dz\,(c-z)^2\le c^3a. \end{aligned} \end{equation} So, if your inequality holds, then \begin{equation} C(f)\ge\frac{\text{lhs}}{\text{rhs}}\ge\frac{c^2a^2}{c^3a}=\frac ac. \end{equation} Since the "height" $c$ of the function $f$ can be arbitrarily small, there is no finite $C(f)$ expressed in terms of the Lipschitz constant and the size of the domain such that your inequality holds.