I am not an expert, this is what I found in books. (Mainly "The theory of the Riemann zeta-function" by S.J.Patterson).
The explicit formula for psi_0(x) is due to von Mangoldt.
If we let where runs the zeros of the zeta function with , then |x^(rho)|<=x, 1/rho=O(1/T), there are O(log T) such zeros. Thus, S(x, T)=O((x log T)/T).
I don't know where you got .