You could differentiate the functions numerically.
In[1]:= mu0 = 4*Pi*10^(-7) (*The magnetic permeability of air*);
i = 1 (*The current in Ampère*);
a = 2*10^-3 (*Distance between origin and ellipse along x in m*);
b = 10^-3 (*Distance between origin and ellipse along y in m*);
d = 10^-3 (*Distance between the origin of the ellipse and z=0 in m*);
n = 255 (*Number of windings*);
In[7]:= bx[x_?NumericQ, y_?NumericQ, z_?NumericQ] :=
mu0*i*b*n/(4*Pi)*
NIntegrate[((z +
d)/(x^2 + y^2 + (z + d)^2 + a^2*Cos[t]^2 + b^2*Sin[t]^2 -
2*a*x*Cos[t] - 2*b*y*Sin[t])^(3/2) - (z -
d)/(x^2 + y^2 + (z - d)^2 + a^2*Cos[t]^2 + b^2*Sin[t]^2 -
2*a*x*Cos[t] - 2*b*y*Sin[t])^(3/2)) Cos[t], {t, 0, 2 Pi}]
In[8]:= (bx[10^-3, 0, 0] - bx[-10^-3, 0, 0])/(2 10^-3)
Out[8]= 35.7709