Let the slope of the tangent to a curve \( y=f(x) \) at \( (x,y) \) be given by \( 2 \tan x \left( \cos x - y \right) \). If the curve passes through the point \( \left( \frac{\pi}{4} , 0 \right) \), then the value of \( \int_{0}^{\pi/2} y \, dx \) is equal to: