This plugin might help:
https://www.ads-software.com/support/topic/500-503-error-pages/
Another approach is to use a rewrite rule in .htaccess to load a page which could send you an email notification:
https://httpd.apache.org/docs/2.4/custom-error.html
[Thanks to @sterndata for the additional information.]
]]>