Yea, though I walk through the valley of the shadow of death, I will fear no evil: for thou art with me; thy rod and thy staff they comfort me.
It doesn't matter where we are in life, God is always with us. We might literally be in a very dangerous place, or it may be that we are mentally in a bad place, either way, God is with us.
Psalm 27 asks who should we be afraid of if God is with us.
Psalms 27:1 The LORD is my light and my salvation; whom shall I fear? the LORD is the strength of my life; of whom shall I be afraid?
Should we even fear our own thoughts?
God is our strength and guide. The purpose of the rod and staff is for discipline, guidance, and protection. God's ways are all those for us. His commands are not meant to make life hard for us, but to protect and guide us and when needed, discipline us. We should take comfort in the knowledge that God loves us enough to desire to do all that for us. Just as our children know that we love them by giving them guidelines and limits, so must we feel towards God.