I'm not sure how you could really prepare for that mentally. You'd have to either be able to go from grocery shopping mode to crisis mode at the drop of a hat or be switched on all the time, either of which would take a good bit of fortitude. Generally, I guess 'condition yellow' would be a good state to be in. Be aware of your surroundings, how you got where you, how you plan on getting back, etc. In big crowds you could look for alternative exits, note where there might be congestion at an exit, etc.
I know groups like Red Cross offer first aid/CPR/AED classes for regular folks that covers a lot of stuff that would be of great benefit from situations ranging from someone choking in a restaurant to something like what happened in Boston. Obviously there is more in-depth training available for first responder types. I don't know of any specific classes on how to respond to those types of situations but I'm sure they cover it in some of the myriad tactical courses out there.
It wouldn't take much to throw together a small first aid kit that you could EDC, even if you're not the man purse type. I think that with some common sense, basic training and some 'normal' EDC items (I'm thinking stuff like leatherman, pen, paracord, quickclot) you could do well to get out of a jam.