You do not say what's wrong with the dimmer and you do not describe any details of the lamp so a sensible answer is somewhat difficult.
In brief - dismantle the lamp - extract the dimmer - find a replacement dimmer - it need not be exactly the same - just one that fits and can manage the load - and put it all back together.
That's the way to do it!
Mr Punch..., March 2016