Find all polynomials $P$ with integer coefficients such that for all positive integers $x,y$, $$\frac{P(x)-P(y)}{x^2+y^2}$$ evaluates to an integer (in particular, it can be zero).
1. **Restate the Problem:**
   We need to find all polynomials \( P(x) \) with integer coefficients such that for all positive integers \( x \) and \( y \), the expression 
   \[
   \frac{P(x) - P(y)}{x^2 + y^2}
   \]
   evaluates to an integer.

2. **Polynomial Formulation:**
   Let \( Q(x, y) = P(x) - P(y) \). We need \( x^2 + y^2 \mid Q(x, y) \) for all positive integers \( x \) and \( y \).

3. **Divisibility Condition:**
   We need to find polynomials \( P(x) \) such that \( x^2 + y^2 \mid P(x) - P(y) \) as polynomials. This means \( Q(x, y) \) must be divisible by \( x^2 + y^2 \).

4. **Form of \( Q(x, y) \):**
   Consider \( Q(x, y) = P(x) - P(y) \). We can write \( Q(x, y) \) as:
   \[
   Q(x, y) = \sum_{i=0}^{k} a_i (x^i - y^i)
   \]
   where \( k = \deg(P) \).

5. **Lemma 1:**
   If \( F(x, y) = \sum_{i=1}^{k} a_{4i} (x^{4i} - y^{4i}) \), then \( F(x, y) \) is divisible by \( x^2 + y^2 \).

   **Proof:**
   Consider the product:
   \[
   (x^2 + y^2)(x^{4n-2} - x^{4n-4}y^2 + x^{4n-6}y^4 - \cdots + (-1)^{\frac{k}{2}+1}x^{4n-k}y^{k-2} + \cdots - x^4y^{4n-6} + x^2y^{4n-4} - y^{4n-2})
   \]
   This expands to \( x^{4n} - y^{4n} \), showing that \( x^{4n} - y^{4n} \) is divisible by \( x^2 + y^2 \).

6. **Square Functions:**
   Call any function \( F(x, y) \) square if \( x^2 + y^2 \) is a factor of it. The sum of any square functions is another square function.

7. **Form of \( P(x) \):**
   For \( Q(x, y) \) to be a square function, it must have only terms with exponents which are multiples of 4. This implies that \( P(x) \) only has exponents which are multiples of 4.

8. **Non-Square Functions:**
   Let any function that is not a square function be called a nonsquare function.

   **Lemma 2:**
   Let \( F(x, y) \) be a square function and \( G(x, y) \) be a nonsquare function. Then, \( F(x, y) + G(x, y) \) is a nonsquare function.

   **Proof:**
   Let \( F(x, y) = D(x, y)(x^2 + y^2) \) and \( G(x, y) = Q(x, y)(x^2 + y^2) + R(x, y) \), where \( R(x, y) \neq 0 \). Then,
   \[
   F(x, y) + G(x, y) = D(x, y)(x^2 + y^2) + Q(x, y)(x^2 + y^2) + R(x, y) = (D(x, y) + Q(x, y))(x^2 + y^2) + R(x, y)
   \]
   which is nonsquare by definition.

9. **Lemma 3:**
   Let \( F(x) \) be a polynomial with no exponents that are multiples of 4. Then, \( G(x, y) = F(x) - F(y) \) is nonsquare.

   **Proof:**
   Assume \( G(x, y) = F(x) - F(y) = Q(x, y)(x^2 + y^2) \) is square. Treat \( x^2 + y^2 \) and \( G(x, y) \) as polynomials in \( x \), so \( x = yi \) is a root of \( x^2 + y^2 \). Then, since \( x^2 + y^2 \mid G(x, y) \), we must also have \( G(yi, y) = 0 \).

   Let \( F(x) = \sum_{m=0}^a a_m x^{4m+2} + \sum_{n=0}^b b_n x^{2n+1} \). Then,
   \[
   G(yi, y) = F(yi) - F(y) = \left( \sum_{m=0}^a a_m (yi)^{4m+2} + \sum_{n=0}^b b_n (yi)^{2n+1} \right) - \left( \sum_{m=0}^a a_m y^{4m+2} + \sum_{n=0}^b b_n y^{2n+1} \right)
   \]
   simplifies to
   \[
   \left( -2\sum_{m=0}^a a_m y^{4m+2} \right) + \left( \sum_{n=0}^b b_n (yi)^{2n+1} - \sum_{n=0}^b b_n y^{2n+1} \right)
   \]
   Clearly, the polynomial cannot equal 0, so it is nonsquare.

10. **Conclusion:**
    Since \( Q(x, y) = A(x, y) + B(x, y) \) where \( A(x, y) \) contains only exponents which are multiples of 4, and \( B(x, y) \) contains only exponents which are not multiples of 4, by Lemma 3, \( B(x, y) \) is nonsquare. Since \( A(x, y) \) is square, then by Lemma 2, \( Q(x, y) \) is nonsquare. Therefore, a polynomial \( P(x) \) satisfies the problem condition if and only if it only has exponents that are multiples of 4.

\(\blacksquare\)

The final answer is \( \boxed{ P(x) } \) only has exponents which are multiples of 4.