Sorry, I Misunderstood.
I’m afraid the X-Plane's built-in ATC is rather limited. You can only pick from a few canned ATC requests.
There is a free plugin called “124thATC”. Generally thought to be a bit better. They allow you to request an alternate airport in midflight, but no specific emergency assistance/handling from ATC per se.
Beyond that, real person online voice ATC services, such as VATSIM, do allow emergency calls. However, the controller may cooperate, or may deny you and tell you to “stop” the emergency simulation.