17-year-old Esperanza Quintero was trying to save her friend’s life after he was shot … but when she called 911 the dispatcher didn’t like her attitude and told her to “deal with it” before hanging up.

The 911 tape of that horrific night was released Monday … and dispatcher Matthew Sanchez has resigned in the wake of the incident.

Esperanza’s friend Jaydon Chavez-Silver — also 17 — was shot in a drive-by in Albuquerque, NM on June 26th … and Esperanza frantically called 911.

After answering the same question about Jaydon’s breathing multiple times, Esperanza fired back at the dispatcher with, “He’s barely breathing. How many times do I have to f****** tell you?” … and that’s when Sanchez lost his cool.

Paramedics were already en route to the scene during the call … but that didn’t excuse Sanchez’s actions.