(Solution that worked for me is in bold text below)
Since launch, I've gone through three different rigs and at least as many mice. Every rig I have ever played on has had this problem:
When rotating the camera by holding a mouse button, sometimes - particularly if I have momentary frame rate stutter - the camera will fly off wildly in a random direction and I'll end up pointing off a bridge or into something worse than death, like Episode I.
It's as if the mouse acceleration keeps compounding during the frame rate skips and slams into the control buffer all at once. Sometimes the acceleration values don't clear properly, either, so I have to sit there for a few seconds spinning the camera manually until I regain control.
Anyways, I have a Redragon Perdition M901 mouse - I replaced my old Razer Naga with it and never looked back - and this problem was frustrating me, so I decided to fiddle with it.
On a Reddit thread five years ago, user "OniYume" posted a fix, and I'd like to share that with you because it turned SWTOR from a sad, unplayable dream into a beautiful, functional reality.
If you have a Razer mouse, or a Redragon mouse, or a fancy Logitech gaming mouse, or anything with big old fancy polling rate settings, TURN THEM DOWN. It sucks to have to do it but I set my polling rate down from 500HZ to 125HZ, and while I can still feel the problem sometimes, it doesn't swing my camera more than a few degrees when it happens. It's playable. I can perfect my speeder bike drifting and one day reach the D Dimension.
Or, you know. Finally cap that smuggler.