You can only equate forces in a particular direction when the net acceleration along that direction is zero. In this case, after a certain time after the string snaps, there is a net acceleration as a result of the tangential acceleration and the centripetal acceleration as you have shown in your diagram.
The key here is that the acceleration $a_t$ whose magnitude is $|\frac{dv}{dt}|$ is non-zero at the instant you snap the string, despite the speed being zero at that instant. (It resembles the situation where a ball at the top of it's trajectory has a velocity of zero ; it still has an acceleration.)
Hence, when you apply the laws of motion in the direction in which you have resolved forces $Tcos\theta$ and $mg$, you will find that:$$\sum F_y = ma_y => Tcos\theta - mg = m(a_tsin\theta)$$
Clearly you cannot equate the two in this case.
However when you resolve the forces in the direction along the radius of curvature, at the instant the string snaps, the centripetal acceleration $a_c$ whose magnitude is $v^2/R$ is necessarily zero because $v = 0$ as you wrote. Furthermore, as $a_t$ and $a_c$ are perpendicular, there is no component of tangential acceleration along the radius. Hence, the laws of motion give you:$$\sum F_r = ma_r => T - mgcos\theta = mv^2/R = 0 => T = mgcos\theta$$
Hope this helps.