Deus ex Machina is a literary device best to be avoided. The term comes from the days of Ancient Rome and Greece when God was literally a machine that appeared to come from the sky to save the day. Back in the days of film serials this was represented by the calvary rescuing the hero at the last moment. For the modern writer this device is best avoided as it cheapens the experience.
Then there are times seen most often in horror films when the one person (or even a small group of folks) come to the rescue and are offed in and of themselves, immediately and without fanfare. Granted, this moves the story forward, ups the tension for the protag and does every little thing a good plot device is supposed to do but I still hate it, and this is why.
In House of 1000 Corpses, the cavalry comes in the form of a couple of bumbling police officers who, nonetheless, are able to follow a string of clues to find the specific house in the title. Good for them, but their death is immediate and considering the modus operandi of the rest of the murders it simply doesn't make any sense. The family of killers could care less whether they were officers or simple shmucks off the street, their reason for existance is to torture and inflict as much pain as possible. A quick death is not what they would do.
This could have been better handled with a quick clonk to the head and an unseen perpetrator dragging the officer off scene until that inevitable "stumble across the masses of corpse artwork" that the heroine of the tale did. I feel this would have worked because it makes the scene of disabling the officer just as quick as it needed to be and yet still kept true to the homicidal maniacs of the tale.
Then there's The Shining. It doesn't matter whether you read the book or have seen either variations of the movie, the cavalry in this case was the black dude (sorry, I can't remember his name off the top of my head) who also had that unusual and unique gift that he calls "The Shining." Sensing that the boy is in trouble, he goes to the inn on some "grand mission" or "impulse," I've never been able to figure out quite which one and bonk with a hammer and he's dead as soon as he enters the hotel.
The instant death isn't the problem as I see it. The trouble is that while it increases the tension for the reader it does nothing to increase the tension for the characters. What if the black dude in question wasn't immediately killed, but was, in fact, dying and the little boy, in turn, knew his friend was in trouble and just beyond this corner or that corner?
Good kids are noble creatures who will think nothing of personal harm if they know a friend is in trouble. And despite all the weird crap this kid has gone through, he's still that kind of kid. Imagine how much better the movie would have been if the kid wasn't just trying to escape from Daddy but help his friend as well?
Then we have the current television fare of The Dead Zone (not to be confused with the movie). In one episode, Johnny has grounded his kid for a round of garage cleaning when there is a knock on the door. Poor Johnny can't just answer the door, he knows the teenager behind it is in a lot of trouble. Fast forward a bit, the teenager, Johnny and Johnny's kid are holed up in a basement trying to protect themselves from the bad guy. Well, Johnny's kid's stepdad is a police officer (well established from prior episodes, so we're not really surprised) who gets a call from the US Marshall. It turns out that the troubled teen is a key witness to a mafia hit and the bad guys aren't your run of the mill type.
Anyway, following a trail of bloody footprints and the like, this cop finds these bad guys over at Johnny's house and finds himself at the mercy of the bad guys vis a vis duct tape.
This works well because not only is the viewer's tension cranked up, but the character's as well since there's a PA system which connects to the basement. Y'see, Johnny's kid has been raised by his stepdad because of that whole coma thing. So we're talking about a relationship between stepkid and stepdad that goes beyond the ordinary parameters of this type of relationship.
In other words, Johnny's kid is seriously considering giving this teenager up for his stepdad's safety. Johnny, however, realizes there's only one of two ways that this thing is going to end: either they're going to win and get the heck out of this house or everyone is going to die. This isn't magic vision, this is the reality of the situation.
In the end, it's Johnny who saves the day via an underground tunnel which Johnny found via "visions from the past." And that's the way it should be.
In conclusion, go ahead, let your cavalry come and try to save the day, but put them in a peril which increases the tension not just for the reader but for the characters as well.