you have to know the right formulas to simulate the tank ( or a simpler model ). Then you have to write the code acording to this.
Things you should look for:
center of mass
forces
springs
That is just a rough idea i had. dont know wether it is correct

A simpler method would be:
to get the tilt rotaion axis of the turret according to the tilt angle choose a suiting value x. With this value you rotate the tank body at its mass center arround the horizontal axis of the touret. Additionally you lower the value of x over time so the rotation gets slower and slower. The rotation around this axis shold be clamped to some angles.