If theta is a bit bigger than zero, it's basically 2. start there.
sin(theta)'s gradient is less than 1, but theta's gradient (wrt theta) is 1, so theta/sin(theta) is getting bigger as theta increases for as long as sin is getting bigger (0-pi/2)
Then sin stays positive but is getting smaller, as it's bounded by 1, theta/sin(theta) starts getting huge
Then it gets undefined at pi, obviously, then the same thing happens in reverse! (think of the interval (-pi,pi] I noticed you were using [0,2pi] this is wrong.