While each emergency can be vastly different, the best thing you can do, if at all possible, is keep a calm, cool mind-set. Doing too much too soon will likely result in a bad outcome. Your situation may be such that you have to make decisions swiftly. But, if possible, think the situation through, get some extra altitude, and see if you can fix the problem at hand. If you can't, see if you can get assistance through ATC. The controller may be able to contact someone on the ground with special knowledge about your situation who can give suggestions on how best to handle it.