In Opera (the Opera that opens up), goto the URL opera://settings/handlers. You should see a Gmail handler there.
When it's there, clicking on email links in Opera will open the Gmail compose page. In addition, Opera will tell Windows that it can handle the mailto protocol and Windows will allow you to set Opera as the default email client on the system.
So, you can just go into "Settings -> Apps -> Default Apps" in Windows and set the program you really want as the default for email links. Then, only email clinks inside Opera will open in Gmail. If you don't want that, you can click the 3 dots next to Gmail at opera://settings/handlers and remove the Gmail entry. Then, clicking email links in Opera will load in whatever email client you have set in Default Apps in Windows.
The way the entry gets added to opera://settings/handlers is that the mail.google.com page will ask you if you want to allow or deny the handling of email links and if you click "allow", it gets added.