apt-get remove --purge gpm
(and the other stuff it uses, like imwheel and so on)

dpkg-reconfigure xserver-xfree86


select the apropos device for you mouse (if it is USB /dev/inpu/mice, PS/2 /dev/aux, etc...) then re-write your conf...

Goto CTRL-ALT-F1 and login (as root or you and su to root)

/etc/init.d/gdm stop ; /etc/init.d/gdm start
or whichever Display Manager you use.

That should take care of your issue.