A counterexample was given in comments by Kelenner: $f(x)=\frac{1}{1+|\log x|}$ for $x>0$ and $f(0)=0$.

You may be interested in the concept of Dini continuity. If a function is Dini-continuous, and $f(0)=0$, then $\int_0^1 \frac{f(x)}{x} \,dx$ converges.

Dini continuity can be awkward to work with, but it's the weakest assumption that makes the logarithmic divergence in $1/x$ go away. As a result, it comes up in the context of singular integral operators.

The better known assumption of Hölder continuity implies Dini continuity, and thus is sufficient for your purpose. Both of these are much weaker than differentiability.