How recently have you started sparring? - Its natural to have a little apprehension to getting hit, but you need to be in control of that fear. This one kid I was brought in to take a look at, had amazing natural talent. Good offense, good defense, good footwork and takedown defense, and a fairly good ground game. (i assisted a MMA gym).
But if you got inside his gap and applied pressure, he'd wilt, lose all heart, and just mentally quit and either throw illegal blows or just cover up and wait for someone to stop it. He feared getting trapped against the fence and getting beat on.
It took a lot of soul searching, and talking with the kid, to start making improvements. What we eventually found that worked was giving him tools to use when he's in that fear zone. And letting him know that everyone has that fear, but its better to be the guy that fights through it than the guy that just lays down and hopes for mercy.
My suggestion is to have a mental gameplan for when you get hit, figure out why you're scared and work to not so much avoid the fear, but to not allow that fear to control your actions in the ring...
or as I've seen Ray say in the past . . . "bowling is a fun game"