To be at peace with yourself & be happy all the times, you need to surrender your ego to the God completely. We need to be in constant remembrance of God. We need to take complete refuge in God by surrendering our ego at the feet of God. By complete surrender to God we do get freedom from all our sins and sorrows. In God there is no sin or sorrow. God is like the Sun in which darkness cannot exist. God is complete Joy, complete Bliss. When we are surrendering our ego to God, then we are surrendering ourselves to Joy & Bliss.
Whenever our ego separates ourselves from God, we become sad & unhappy & all tensions of life surround us. In any case we should not be egoistic, as to be egoistic is to show our separate existence from God, separate existence from Joy & Bliss. When the subtle veil of ego is torn between you & God then you are full of Joy & happiness. Just think yourself to be an instrument of God & devote fully to God.
So do Complete Surrender to God, as in this way you shall be free of all tensions of life & shall be at peace & be happy during all walks of life. Below verse of Bhagwat Gita teaches the same.
mam ekam saranam vraja
aham tvam sarva-papebhyo
mokshayisyami ma suchah" (Bhagwat Gita: Chapter Eighteen verse 66)
"Sri Krishna said: O Arjuna, Surrender unto Me alone. By surrendering all duties to Me, seek refuge in Me. I shall absolve you of all sins; grieve not."