Deck is moving away from house
The deck isn't pulling away from the house so much as leaning away from the house.  It's tight at the bottom and separating at the top.  

It looks like the reason for that is the outside posts rest on a patio that is settling.  If you look at the third picture, you can see a wedge-shaped gap between the concrete patio and the step at the patio door.  It also looks like an additional gap under the slab at the lawn in that area.

Any fix you do to just the deck support will need to be redone when the slab settles more.  You need to fix that problem first.

There are two downspouts visible.  One dumps water right at the slab's edge, which is a problem.  The other goes into a pipe and where that pipe discharges isn't clear.  However, the picture makes it look like the worst settlement is in that area.  If that pipe actually discharges far away, then the issue may be that the pipe or downspout is full of debris and water is leaking out of the downspout higher up.  

The downspout issues need to be fixed before you tackle anything else.  Water dumped next to the slab soaks into the ground and softens the soil under the slab.  You need to get that water far away from the house.  Even after you stop the water problem, there may continue to be some settling for awhile.  

If there is also a grading problem, you need to fix that so rain water runs away from the house, and rain falling elsewhere doesn't run toward the house.

Once you stop the erosion, soil softening, and settlement, you can decide whether to jack the patio.  A single slab that size will be tough to jack, especially in a way that supports it evenly it's entire depth toward the house.  You could end up breaking it if you can even lift it.  

You would likely need to excavate much of the edge, support broad areas of the slab with timbers, and use a series of bottle jacks to apply pressure across a large area at once.  But even if you lift it, I wouldn't want to support a slab that size by just slipping foam boards under the edge; that creates a lot of stress on the slab and it may crack.  There isn't really a good way to support it from the edge.  

I've seen mud jacking and foam jacking used for big slabs.  That would provide support under the entire slab.  However, it can also settle after a few years, especially if there is still active settling of the soil underneath.

If it were me, I'd be inclined to leave the slab alone unless there is future evidence that it is still settling after you solve the water problems.  The slope isn't so much that it affects it's use.  The gaps, like below the patio doors, can be filled to keep the step supported and improve the appearance.

I would try to fill the gap under the slab edge at the lawn.  You can pack material under it by pounding it in.  It won't do much for support, but it will at least help keep stuff out of the gap, and maybe slow further erosion.

That leaves the deck.  You may want to do a potentially temporary fix until you can assess what's going on with slab settlement.  It looks like the support posts aren't actually secured to the slab, just resting on it.  If that's the case, I'm not sure it meets code and isn't very safe.  Someone more fluent in the code can get into that issue more, but without knowing code requirements, I can suggest what would at least be an improvement.

Use timbers and jacks to raise the side of the deck away from the house until it's level again.  Measure the gap you need to fill between the bottoms of the support posts and the slab.  Use squares of cement board (green board), the dimensions of the post, to fill big gaps.  Use plastic shims (back to back in opposite directions to create adjustable parallel surfaces), for small gaps, with enough shims side by side so the entire end of the post is supported.

Once the post is supported at the correct height, trim away any of the support material extending beyond the face of the post.  Then install brackets on the slab to constrain the post so it can't move laterally.