How to stop getting nervous before sex?

Every time I try to have sex it’s extremely painful. So I went to the doctor to make sure everything is okay and my pap results came back perfectly normal. No STIs, no infections or anything. She just told me I’m straight up nervous. It’s there anyway I can stop being nervous bc even with lube I still tense up down there. I feel like I always associate penetration with pain so is there anyway to stop this?