This sounds similar to the Dirac comb band-structure, albeit with a slightly different potential. This is typically solved graphically - see e.g. here.
You can shade the valid solutions, i.e. when the RHS of your function has values between -1 and 1, to get the allowed bands. Here's an example with the Dirac comb solution, i.e. $f(z) = \cos(z) - \beta \sin[z]/z$:
Block[{intersectionsTop, intersectionsBottom, pairs, rects, pl,
f, \[Beta] = 2},
f[z_] = Cos[z] - \[Beta] Sin[z]/z;
{intersectionsTop, intersectionsBottom} =
Reap[odsoln =
NDSolve[{y'[x] == f'[x], y[-12.5] == f[-12.5] - #,
WhenEvent[y[x] == 0, Sow[x]]}, y[x], {x, -12.5, 12.5}];][[2,
1]] & /@ {1, -1};
pairs =
Partition[Sort@Flatten[{intersectionsTop, intersectionsBottom}],
2];
rects = {Opacity[.5], Gray,
Rectangle @@ Thread[{#, {-1, 1}}] & /@ pairs};
pl = Plot[Cos[z] - \[Beta] Sin[z]/z, {z, -12.5, 12.5}, Frame -> True,
FrameStyle -> Thick,
GridLines -> {Range[-5 Pi, 5 Pi, Pi], {-1, 1}},
GridLinesStyle -> {{Black, Dashed}, {Thick, Black}},
PlotStyle -> {Thick, Red}, Epilog -> rects,
PlotRange -> {{0, 12.5}, Automatic}]
]
ContourPlot
$\endgroup$