This is something a friend brought to my attention, something that he noticed in himself. He said he didn't start feeling guilt unless he was afraid of something. Is fear the cause of guilt? If not, are they at least connected?
In Buddhism, there are two important related words that are generally used as a word compound, namely, 'hiri-ottappa'.
'Hiri' means to feel personally & inwardly ashamed of hurting others or oneself.
'Ottappa' means to have an innate 'fear', 'apprehensiveness' or 'caution' about hurting others & oneself.
A translation of these two words which captures their meaning is 'conscience & concern'. A short essay on hiri-ottappa can be read at this link: The Guardians of the World (by Bhikkhu Bodhi).
These two natural psychological self-protective mechanisms, which are mentioned in Lokapala Sutta: Guardians of the World (AN 2.9), can be related to 'guilt' & 'fear'.
However, 'guilt' & 'fear' are very strong words & emotions, which often are not related to the natural psychological conscience but related to guilt & fear imposed by external authorities ('asura').