If it's RSI/carpal tunnel syndrome or similar (get it checked out if isn't stopping) have you had (or done yourself) a proper desk assessment?
I've made quite a few changes to my working practices since I got some problems like a bit of RSI type pain, tennis elbow (osteopath got the swelling down) and the inflammation with my arthritis.
My ex suffered very badly with RSI and it taught me to get a handle on things as early as possible and up my prevention tactics especially as I type huge amounts and at a very fast speed for most of the working day (then on laptop in the evenings). Once it takes hold badly it can be very hard to get rid of without stopping the problematic activity.
I have a wrist rest (was dubious at first but I love it!), use wrist supports, have a document holder for copy typing so I don't have to twist (I can stay sitting up straight and just move my head).
I also make sure my chair properly supports my back and my screen is at eye level so I'm not twisting my body or hunching over.
I often go for massages to help with back/shoulder/neck pain and they do my arms and hands as well and I notice a big different in how much they relax after massage (compared to how tight they were before).
I also try to have movement breaks and try to check my posture as I still end up hunching a bit (my shoulders feel like they have dropped inches after a massage).
One of the osteopaths I used to say showed me something. He said to stand normally and move my lower arms round in circles (like winding a cog with a handle?). He then said to stand up properly, decent posture, standing up straight, shoulders back etc... and to try it again. Spoke for itself for me!
You could also minimise the use of the mouse by learning as many shortcut keys as possible and adding your own.
You can also get wrist supports with splints in for further support.
With something like RSI though, rest by stopping the cause is the best way of helping it.