No, you don't get $\tan x = 0$; you would get, at best, $\tan x = 1$ (remember that $\tan x = \frac{\sin x}{\cos x}$. If $\sin x$ and $\cos x$ are equal, then the quotient is equal to $1$, not to $0$).
So, you remembered that you want to find the critical points (points where the derivative is zero). That's good. What you also need to remember is that if you have a continuous function on a closed interval, then the maximum and the minimum will each be achieved at either a critical point or an endpoint.
Here, you might as well work over $[0,2\pi]$ (the value at $2\pi$ is the same as the value at $0$). So the maximum and the minimum of $f(x)$ will be achieved either at $x=0$, or at a point where f'(x)=0, that is, a point where $\sin(x) = \cos(x)$ in the interval (better to work with these, since this equality does not depend on $\cos(x)\neq 0$, whereas $\tan(x)=1$ does; of course, it does not really matter here because if $\cos(x)=0$, then $\sin(x)\neq \cos(x)$).
So, the question is: for what points $x$, $0\leq x\leq 2\pi$, do you have $\sin(x)=\cos(x)$? There are two such points; once you have them, simply evaluate the original function at these points, and at $x=0$ (where it has the same value as at $x=2\pi$, which is why we were able to add $2\pi$ to the interval for simplicity). The largest value you get is the maximum, the smallest value you get is the minimum.