Click on Tools and select Options
Click on Applications.
Scroll down to "mailto."
Click on whatever application is currently set for mailto to get a dropdown of other options.
Select "use Gmail."
|Changing mailto application to use Gmail in Firefox|
Chrome offers an extension that you can install by going to https://chrome.google.com/webstore/detail/pgphcomnlaojlmmcjmiddhdapjpbgeoc.
Update 2/28/2012: This was posted on the Google apps blog today:
Starting today, thanks to the magic of HTML5 things are getting simpler. Now, when you go to Gmail in Chrome, you will be asked if you want Gmail to open all email links. Say yes, and clicking on email links in any application on your computer will open a fresh Gmail compose window.
For internet Explorer, they suggest installing the Google Toolbar application then following these directions that allows Google Toolbar to open up Gmail for email links.