I'd like to compute the length $L$ in figure. Is it correct to do it in the following way ($H=0.247$)?
$$ L = H \, \mid \sin(\gamma) \mid = 9.4 \,\, 10^{−4} $$
where $\gamma = \pi - \theta_1 - \theta_2 = \pi - \frac{\pi}{4} - 2.36 $.
If I use:
$$ L = H \, \sin(\gamma) = −9.4 \,\, 10^{−4} $$
it is negative, thus it should be wrong.
Thank you very much.

Yes, that is the correct approach.
If your answer is wrong, are you sure it isn't $2.36$ degrees, or perhaps was $2.36$ a result of rounding?
If you did, multiply degrees by $π/180$ to get the radian angle.
If your $\theta_i$ are correct, your answer is too.