Gnome Gmail does just that for you. It add support for making Gmail the default mail application for the Gnome desktop.
Once you install it make sure you go to:
System > Preferences > Preferred Applications
And choose Gmail as you default "Mail Reader"