It's often very difficult to do this--even when someone goes to the hospital and is evaluated with the best medical equipment. Much of the differentiation between the two is delineated with the history and character of the chest pain, but also from biochemical testing as well as serial electrocardiograms. All this is also taken in the context of the patient's medical history. If a 65 year old man with a medical history of poorly controlled diabetes, high cholesterol and long-time smoking comes in with crushing retrosternal chest pain radiating to the left arm, well, that pain is likely from a cardiac cause and should be investigated/treated accordingly. Of course, classic text book cases don't always present to the emergency room that way. Often what happens is that all the tests are done, the history is taken, and the person is observed for a while. If no conclusion can be drawn and the person is on adequate medical therapy for his background medical problems, well, there is not much you can do other than discharge the person with close medical followup. Unfortunately, in situations like those, you can't often tell who may go on to have a heart attack later. Troubles with patients' confidence arises when that person who is sent home ends up developing a heart attack. It happens even with the best medical observation and unfortunately what it is is bad luck. As long as all other medical standards were abided by, it's no fault of anyone.
Anyone who is able to come up with a quick bedside test to confidently differentiate between cardiac and non-cardiac causes of chest pain would win the Nobel prize of medicine!