Often proper working style, working without bending wrist, using smooth movements to operate the
mouse and key pad, and relaxing the joints of
finger, wrist and arm in between helps. A wrist support or arm support too helps and you have computer chairs with support for your spine and arm. In your case the problem may have been there for a long time, but repeated clicking of the mouse or any such work (thus injuring the tendon of index finger) could have triggered the pain now.