Learn how to relax while you grapple. Relaxing doesn't mean letting the other guy "win". Watch boxers or basketball players or any top level athletes. They are relaxed. Even though jiu-jitsu is a "combat sport", you still have to relax. It is still an athletic endeavor and you have to relaxt to perform.
But how can I relax if I have to fight someone? Relaxing doesn't mean not fighting. It doesn't mean not trying to execute your techniques.
If someone is attacking you and you're in a bad position maybe getting smothered or feeling clastraphobic...protect yourself (of course) and just relax. Are you in danger? No. Okay....just breathe and relax there. Talk yourself through it...relax. Then think about what your next step is. Keep protecting yourself. Then move and do what you need to. Stay relaxed.