Stay calm, don't panic, if you didn't have a plan coming into this carnage then there is nothing you can do now to change what just happened. Stay away from all the fear mongers, or that this is 1987 all over again, etc. In 1987, the market was down 24% in one day, we are down 3.5% as I write this. Stocks returned over 400% in the 80's all people talk about is 1987, hat tip, Ben Carlson.
When you look back at all the previous corrections you can focus on what happened when the correction was occurring, the few painful days/months or what happened years later, don't be short sighted. Take this correction as an opportunity to get a plan together for the future. There are no fool-proof investing plans; you will encounter good times and bad times.
Here are some posts that will help you get through this period;
History Of Crashes
Don't Try To Avoid The Unavoidable
8 Soft Facts About Shorting