Actually, $\mu$ will be $\sigma$-finite if and only if $f(x)<+\infty$ for all $x\in X$.
Indeed, if $f(x)<+\infty$ for all $x\in X$, then $\\{\\{x\\},x\in X\\}$ is a countable partition of $X$ and each element as a finite measure.
If $\mu$ is $\sigma$-finite, there exists a sequence of subsets of $X$, say $\left(A_n\right)_{n\geqslant 1}$ such that $\mu\left(A_n\right)<+\infty$ and $\bigcup_{n\geqslant 1}A_n=X$. Let $x\in X$; there exists some $n$ such that $x\in A_n$. Then $$ f(x)=\mu\left(\\{x\\}\right)\leqslant \mu\left(A_n\right)<+\infty. $$