Goto https://mail.google.com/ and log in.
Once you're in your Inbox (where you see https://mail.google.com/mail/u/0/#inbox in the address field), hit ctrl + shift + j to open the console.
Copy:
navigator.registerProtocolHandler("mailto", "https://mail.google.com/mail/?extsrc=mailto&url=%s", "Gmail");
, paste it into the console and press enter.
When the allow/deny dialog pops up, click "Allow".
Goto the URL opera://settings/handlers. If you have more than one email entry, click the 3 dots to the right of the mail.google.com entry and choose "set as default".
Then, you're good to go for mailto links in Opera.
If you also want clicking mailto links in other programs to open the mailto link at mail.google.com in Opera:
In Windows, goto "Settings -> Apps -> Default Apps -> Opera Stable", click the mailto entry and choose "set default".
You can test the Windows association by hitting Windows key + r to open a command prompt, type start "test" "mailto:test@example.com" and pressing enter. It works best if Opera is already open. If Opera is not already open, it might fail sometimes due to a bug. In the case of clicking on a mailto link in another program, you'd just click the link again once Opera is fully started.
Note" Setting Opera as the default mail client on Windows is this case might work best with an all-user install where Opera is installed to "C:\Program Files\Opera". Click "options" in the installer and adjust the install path and "install for" options if you ever decide to mess with an all-user install.