The derivative is in itself a limit. So the problem boils down to when one can exchange two limits. The answer is that it is sufficient for the limits to be uniform in the other variable. In other words, if you're trying to switch order of say, $\lim_{x\rightarrow a}\lim_{y\rightarrow b}f(x,y)$, then you need $|f(x_1,y)-f(a,y)|<\epsilon$ whenever $|x-a|<\delta$, where $\delta$ does not depend on $x$, and similarly for $y$.
On the other hand,your problem immediately follows from linearity of integrals and the fundamental theorem of calculus. Afterall, $\int_x^\infty f(t)dt=\int_x^yf(t)dt+\int_y^\infty f(t)dt$, where $y$ is any fixed number, and the derivative of the second term in $x$ always vanishes since it's constant. So what's hidden in here is that taking a derivative of a constant ensures the two limits commute.