At night, flood down to about 32', or the deepest you can be with diesels still running. That saves batteries and keeps your speed below the critical 10 knots that seems to get you spotted if you exceed it.

You are less detectable on sonar if you stay at or above periscope depth, and on the surface is even better for sonar. If the moon is out or sea is smooth you'll have no choice but to be at periscope depth. Dark night and rough seas call for a surface attack flooded down decks awash.
TMO gets inside your head and seems much worse than it is. With experience you'll be doing much better. Dying teaches you a lot!

The important part is to hightail it out of there right after the torpedoes leave the tubes and take those first shots from a pretty long range.
I'd be sneaking away at 10 knots until I'm more than 3000 yards away, pop to the surface and hit the throttle. You'll have about a half hour, perhaps longer to hit the other side while they circle. Even after they stop circling, they take awhile to surround the convoy again.