Let $p$ be a degree $2$ polynomial with integer coefficients, say $$p(x,y) = Ax^2 + By^2 + Cxy + Dx + Ey + F.$$ I would like to find an algorithm which solves the following:
Problem 1: Given $A,B,C,D,E,F$ determine the smallest possible absolute value that $p(x,y)$ can take with $x,y \in \mathbb Z$.
Does there exists a way to do this? What is an efficient way, algorithmically speaking?
The problem is very simple the form $Ax^2 + By^2 + Cxy$ is positive (or negative) definite. Then, $|p(x,y)|$ takes a minimum over $\mathbb R$, and it will suffice to consider a small number of integer points in the neighbourhood.
Otherwise, (perhaps after multiplying $p$ by some positive integer) one can find a representation of $p(x,y)$ in the form $p(x,y) = (ax + by + c)^2 - d (a'x + b'y + c')^2$, with $d \in \mathbb N$, squarefree and $a,b,c,a',b',c' \in \mathbb Z$. We can now phrase the problem in more fancy terms:
Problem 2: Given $a,b,c,a',b',c'$, determine the least norm of a number $\alpha = k + l \sqrt{d} \in \mathbb Z[\sqrt{d}]$ such where $k = ax + by + c$, $l = a'x + b'y + c'$ for some $x,y \in \mathbb Z$.
The latter is somewhat closer to the original motivation, and gives access to some of the machinery available for quadratic fields.
One possible approach is to list elements of $\mathbb Z [\sqrt{d}]$ in order of increasing norm, up to equivalence modulo an appropriately chosen large integer (which is not a simple task, but is algorithmically feasible as far as I can tell), and then for each $\alpha = k + l \sqrt{d}$ on the list, verify if it takes the desired form. But that's neither elegant, nor very efficient. Are there better ways?
The quadratic form $A x^2 + C x y + B y^2$ is positive or negative definite (implying $|p(x,y)| \to \infty$ as $\|(x,y)\| \to \infty$ ) if $C^2 < 4 A B$ and indefinite (implying $p(x,y)$ is not bounded above or below) if $C^2 > 4 AB$. Your statement about "if the leading coefficients have the same sign" is false, e.g. $x^2 + 3 x y + y^2$ has no minimum (try $x = -y$).