Step 1: Consider the function \( f(x) = \tan x \).
The function \( \tan x \) is odd, because:
\[
\tan(-x) = -\tan(x)
\]
Step 2: When we integrate an odd function over an interval symmetric about the origin, i.e. from \(-a\) to \(a\), the result is \(0\), provided the function is defined over that interval.
Step 3: The function \(\tan x\) is not defined at \(x = \frac{\pi}{2}\) and \(x = -\frac{\pi}{2}\), as it approaches infinity there. Thus, the integral \[ \int_{-\pi}^{\pi} \tan x \, dx \] must be treated as an improper integral.
Step 4: However, if we consider the integral in the principal value sense: \[ \text{P.V.} \int_{-\pi}^{\pi} \tan x \, dx \] it equals \(0\), since the positive and negative parts of the curve cancel out symmetrically due to the odd nature of \(\tan x\).
Final Answer:
\[
\boxed{0}
\]