When in trouble,
Or in doubt,
Run in circles,
Scream and shout.
(Robert Heinlein)
The first thing to do is understand the RTH function and set the RTH height appropriately.
That's also the second and third thing to do.
The next thing to do in a Panic Mode is not to panic.
The next thing to after that is to do nothing - hands off the sticks and buttons until you THINK of an issue you are trying to solve by issuing a command.
Now, the hard part - what is wrong? If the bird is spiralling down to the ground and you don't know why grabbing a control and wiggling it is unlikely to be beneficial. If you have just lost signal, again stop what you are doing. Wait a sec. Move the controller a few feet in a couple of directions, make sure that your antennas are oriented correctly (you have read the part in the manual about antenna orientation, right?)
If you get control back, this is an excellent time to manually fly back to base while practicing Tantric Breathing Exercises. If no joy, hit the RTH button on the controller. Then leave it alone. Mashing on the RTH button will turn it on.
Then off. Then wait. I suspect that a number of Phantoms have been needlessly crashed because the operator eventually turned the RTH button on and subsequently off and that eventually the craft attempted a low battery RTH and didn't make it.
Turning the controller on and off might help but is unnecessary - again RTH will work unless your height is set wrong or you are working against a dwindling battery and the wind. Give the Phantom some time to get back. Although we are not working at relativistic speeds, time dilation seems to be a problem noticed by many UAV pilots.
A quick 'Loss of Control' checklist might look something like this:
Move controller back and forth several feet
Check antenna orientation
Check tablet cable
Consider activating RTH