If this has only happened twice, perhaps your issue is minor and a friend can help you through it. But if you don't have any friend to talk this over with, then it is something you should discuss with your doc and a therapist to see if it can be resolved. Or maybe see a psychiatrist to see what he thinks. No one here can diagnose you from here, because you need some one on one discussion with a professional.
Anything happen recently to make you feel so insecure about your life?