The action for the free relativistic particle with worldline $\gamma : I\subset \mathbb{R}\to M$ is
$$S[\gamma]=-m\int d\lambda\sqrt{-\dot{\gamma}^a(\lambda)\dot{\gamma}_a(\lambda)}\tag{1} $$
Now, one may postulate a second action
$$S'[\gamma,\eta]=\frac{1}{2}\int d\lambda \bigg(\eta(\lambda)^{-1}\dot{\gamma}^a(\lambda)\dot{\gamma}_a(\lambda)-\eta(\lambda)m^2\bigg).\tag{2}$$
These are classically equivalent actions.
My question is: usually what we have is (1) and we have a problem both with the square root and with the massless limit. Given this, how could we think about postulating (2)? In other words, how can we reach (2)?
Usually some people answer this by saying: "it doesn't matter, actions are postulated, you postulate it, compute the equations, prove it works and its over".
Now I beg to differ. I want to know how could someone reason exactly in order to know what to postulate.
I am perfectly comfortable with computing the equations of motion. I want to know is how given (1) we would have the idea to postulate (2).
Is it some special case of some general procedure that deals with constraints?