Is it possible to embed the whole Gmail UI into a web application and control it out of my web application (e.g. select a message by its sender) as well as the other way around that the web application can register, e.g. by callbacks, the activities going on in the Gmail UI (e.g. get all data from the selected/opened message)?
I reviewed the options available like maybe you could add an iFrame with the Gmail web interface to accomplish this. However, I found that Gmail, like most of Google's other web services, sets the HTTP header:
X-Frame-Options: SAMEORIGIN
Because of this, it disables the option of using an iFrame to access Gmail.
The only options available will be the Gmail API with this Google Cloud service
Or you can build your setup using the Gmail API, and link it to buttons in your web application that will call the methods to send email, searching for Messages, work with Drafts, etc. You can read more information about the Gmail API here.
Lastly, you can submit a missing feature request by following the information in this Google Documentation, so they can add the feature later on.