Swimming Unit

I’m in middle school and my gym class is starting the swimming unit. The swimming unit gives me anxiety attacks and makes me really insecure. Does anyone know a way I could get out of it? I know it will only worsen my metal health.