That mental state comes from right thinking determination. It is the state that Jesus Christ promised to all who would heed His words and follow Him.
We can make up our minds to think along certain lines. Some will say they cannot help themselves, but that is not true. There may be other factors that interfere with healthy thinking—like laziness, depression or foolishness. These conditions do not disappear without effort. We can regulate how we think by taking charge of our lives.
Jesus said He leaves His peace with us and we are not to be troubled or afraid (John 14:27 John 14:27Peace I leave with you, my peace I give to you: not as the world gives, give I to you. Let not your heart be troubled, neither let it be afraid.
American King James Version×). That is easier said than done, but when we do not use the strength of our mind to control what and how we think, we will not have that deep inner peace. We can stop worrying and being fearful. Brave and courageous people are those who have controlled their fears. Jesus did that when He was facing His death and He knows that we have the ability to control our thinking. What we need is motivation. Trust Him to give you peace.