You probably know this, but that's anxiety. The heart racing is usually a panic attack. Or maybe sometimes it's a proto-panic attack. I have the exact same phobia.
If you feel a need for medication a psychiatrist should be able to prescribe something for you, whether it's a daily med (like paxil) or an as-needed med (like klonopin).
Do whatever you need to do to feel safer where you are. Keep a nightlight, or whatever lights make you feel better. Turn on quiet music. Have a big snuggly blanket. Anything at all.
Try taking soothing herbs before bed. Take a valerian extract, for example. Passionflower, hops, and kava kava are also recommended for anxiety. You could take them via pill, tincture, or tea. Some forms will be more effective than others. Both the mild & strong forms have their uses... for example you could take mild forms for more of a non-drowsy influence, also although teas are often medicinally mild, simply drinking the hot tea contributes to the soothing effect.
Baths that are not too hot with epsom salts and a few drops of lavender essential oil will be soothing.
Nutritionally, try a Vit B complex supplement and a Calcium/Magnesium (together) supplement. Magnesium deficiency in particular can set off anxiety.
Try listening to relaxation tapes before bed. These can help give you techniques to deal with anxiety. Also they can be part of a coping routine, something which helps to ground you.
I find that the degree of anxiety reflects the degree of my general health. When I'm less healthy overall, I'm more prone to anxiety. When I'm more physically healthy, I'm much less prone to anxiety.
Do what you can to make your general life less stressful and high-strung. Let it be slower, enjoy things more, savor your life, take it easy, adjust your priorities and expectations, let the unsupportive and stressful parts of your life go their own way.
I recommend Edmund Bourne's books on anxiety.