I've experienced various types of computing ergonomic pains since I started using computers. I bought my first computer with a mouse in 1988. Within the first couple of years, I bought my first trackball.[1] It was my main mouse, for a couple of years, but I was spending a lot of time with regular mice at school and then work. A decade later, I got my second trackball [2]. In between I had settled on a particular Logitech mouse that ceased manufacture.
My reason for describing my trackballs[3] is context for my random internet advice:

Large scale ergonomic are more likely to be the long term problem than the small scale ergonomics of mouse versus trackball.

My second trackball relieved mouse pain for a while, but long sessions at the computer still could produce pain in my mouse hand...or trackball hand as the case may be. Big long lasting improvement came from purchasing a new desk [4] with a well rounded corners where the top plane of the work surface meets the side edges. The large radius (say 1cm or more) eliminates the pressure point where my forearm starts to rest on the desktop.

The folding table pretty much solved my problems with mouse hand pain...when I could use it, but most of the workplaces I've worked in had bring your own desk policies...and one actively upgraded all of us to glass desktops while I worked there because glass desks looked stylish.[5]

So these days, I don't have mouse hand pain because I don't use a mouse (in anger for long periods). I use a laptop with a trackpoint and trackpad. I use as many keyboard shortcuts as I can remember. I try to learn the command line. If I had a touchscreen on my laptop, I'd use that too.

Which of course means I use a laptop to eliminate mouse hand pain. I also use it to eliminate keyboard related pain by sitting the laptop in my lap. Because it sits in my lap, I eliminate the pains associated with finding the perfect office chair and desk combination...and lighting, don't forget the effects of dealing with bad lighting on posture and display positioning. I primarily use a lounge chair [6] instead of a desk.

Finally, I still experience pain from bad ergonomics from time to time. When I do:

+ I identify the coarser grained ergonomic issues.

+ I stretch my hands. Arm extended palm down. With the other hand, bend all the fingers together up and back to and past a right angle. Googling "carpal tunnel stretch" was how I found that.

Good luck.

[1]: Like this with a cheap tiny extra push button added for the second mouse button. http://www.richardlagendijk.nl/foto/cip/joystick_wico_trackb...

[2]: Yes, that's a PS/2 Mouseport. It probably shipped with a DB9 serial port adapter as well.
https://d2ydh70d4b5xgv.cloudfront.net/images/e/a/logitech-tr...

[3]: Besides get off my lawn nostalgia and a strange kind of joy that suddenly recollecting the old Amiga trackball brought me seven minutes into the in-head composition of this comment.

[4]: Well actually a folding table with a molded top. Probably similar to this, but I would inspect the corner in person: http://www.globalindustrial.com/p/office/tables/folding/port...

[5]: That's what you get working for a corporate VP of design in an organization where design is pretty pictures.

[6]: Ikea Poang with Ottoman