You can find a equation by googling the distance between a line and a point.
If a and b are the two points of the diagonal and p is the other point then the distance from p to the line would be:
Abs(((P.x-a.x)*(b.y-a.y)-(p.y-a.y)*(b.x-a.x))/distance(a.x,a.y,b.x,b.y))
Edit:
Oops you wanted y distance, that would be this:
Abs(Lerp(a.y, b.y, (P.x-a.x)/(b.x-a.x))-p.y)