You don't save before stealing / trespassing? There should be a couple of auto saves before that point, at least.
Can you sneak close enough to close the warehouse door?
Can you go around through the docks, and up to the rest of town that way?
If that's what I was doing I would totally have saved but I was just following the dialogue tutorial. What about trying to charm someone into letting you in and failing makes them immediately go into berserker mode and try to kill you? There's no door to close, it's still locked. I ended up using a save editor to make myself near-invincible and have a ton of AP so I could just kill Curtious and the guards that came to his aid. I gave myself 50 sneak so I could get right next to him and only the people in the building came after me. Once I ran away the regular people weren't still after me.
It sucks that I had to kill him and I don't know how I'll ever open that door but it's pretty stupid that just following the basic dialogue options makes an NPC go completely berserk. It's bad roleplaying as well. If someone says, "I just wanna take a peak" you just say, "No, get lost" not "PEAK? PEAK AT THIS SWORD DOWN YOUR THROAT!", what kind of crappy psyche screening is this town doing on their guards?