Faith. That's the correct answer. We've heard that often. As well as faith and fear cannot coexist. While I absolutely know this to be a true principle, it's actually really hard for me to implement. But I've found a stepping stone that is really helpful for me.
Maybe it can help you too.
For me, the opposite of fear is gratitude.
I find that fear, for me, is often based around the unknown of the future. Or the outcome of something that I cannot control. When I notice that I am feeling fear, I take a minute and try to be grateful. And it refocuses me.
I don't know what the future holds. I can't control much of anything. But I can express gratitude to my Heavenly Father for prophets who are on the earth today. For the scriptures which can help me know how God guided people in times past. For the beautiful mountains that I can stare at all day. For my parents and siblings who are amazing examples. For a wonderful job. For a beautiful home. Incredible friends who let me talk their ear off.
The list could obviously go on and on.
Gratitude helps me focus on the here and now. One of my former stake presidents said, "Jessica, you have a lot of haves and very few have nots. Make sure you focus on the haves and not the have nots."
That's probably when I first started noticing that the opposite of fear, for me, is gratitude.