To automatically resolve email incidents, you’ll want to set up your monitoring service to send an email at the onset of an incident (Trigger Emails) as well as when the system returns to normal (Recovery Emails). These two sets of emails are linked by an Incident Key, a unique identifier shared between these two emails- often the name of the host, server, or application experiencing the problem.
To parse emails, you need to add rules that tell PagerDuty whether an email is a trigger or a recovery email, as well as where to find the incident key to match them up. You can find an in-depth guide on doing this here.