Every time after I've had a thought or said something and lose peace, I sense or know that the cause is the presence of ego. Test it yourself to see if you feel the same. I say that there is a genuine you in you and the ego turns you into a phony you. Anytime you think or speak as the phony you, you lose your peace. If you don't have any ego, that means you no longer play god. Then you acknowledge that there is only one God and you can't help but trust in him. And trust leads to peace. In short, be the genuine you and you'll have perfect peace.