Here it is in words, more details below.
- Rotate by $\alpha=-90^\circ$ about $z$ so as to bring your $y$ axis around to point along the $x$ axis.
- Rotate by desired angle $\beta=\theta$ about $x$.
- Rotate by $\gamma=90^\circ$ about $z$ to put the $y$ axis back where it was.
The information you need
for the more general case is on the Rotation formalisms Wikipedia page, and on the Euler angles Wikipedia page.
Your initial specification of the rotation is in the "angle-axis" form (rotating by angle $\theta$ about the axis $(0,1,0)$ in your case). This section describes how to convert from that to a $3\times 3$ rotation matrix. In your case
$$
\begin{pmatrix}
A_{11} & A_{12} & A_{13} \\
A_{21} & A_{22} & A_{23} \\
A_{31} & A_{32} & A_{33}
\end{pmatrix}
=
\begin{pmatrix}
\cos\theta & 0 & \sin\theta \\
0 & 1 & 0 \\
-\sin\theta & 0 & \cos\theta
\end{pmatrix}
$$
Then you need to convert the rotation matrix to Euler angles, and I'm guessing you want the $z$-$x$-$z$ extrinsic version in which the axes remain fixed,
but you should check this carefully. This section describes how to do that.
There are some caveats in that section about multiple solutions etc, which you should check.
Anyway, in your case
\begin{align*}
\alpha &= \text{atan2}(-\sin\theta,0) = -90^\circ \\
\beta &= \arccos(\cos\theta) = \theta
\\
\gamma &= -\text{atan2}(\sin\theta,0) = 90^\circ
\end{align*}
Check also the sign conventions, it's a notorious minefield.