change direction by rotating object around y axis and adding relative torque

I have this code for changing rotation of y to change direction of ball by adding relative torque. It works find for few seconds after adding relative torque but then it will just start spinning like crazy.

transform.rotation = Quaternion.Euler (new Vector3 (transform.rotation.eulerAngles.x, angle, transform.rotation.eulerAngles.z));

Any suggestion for alternative code?

Screenshot of my screen: Imgur: The magic of the Internet

How do you add torque? If you do it by rigidbody you can set constrains (in rigidbody).
Also other option is to set at the beginning startingRotation. And rotate according to startRotation.

transform.rotation = Quaternion.Euler (new Vector3 (startingRotation.x, angle, startingRotation.z));