Two principles here:
When dealing with a differential equation, you define intermediate state variables so everything is in terms of first derivatives.
This system is nonlinear, so the state-space equations won't be in terms of matrices.
Applying these principles, we define a state vector:
\mathbf x = [x_1, x_2]^T,
x_1 = y \\
x_2 = \dot y
Switching between 2 PID controller is called gain-scheduling. There are various ways to implement gain scheduling. But basically, the idea is that the gain should change smoothly. You should not change suddenly. You could have one set of gains if T < T1, another set if T > T2 and use interpolation between the 2 sets if T1 < T < T2.
You can also ...
UPDATE: My original answer incorrectly assumed the outer loop would not impact the result, but as pointed by Ben, this transfer function is dependent on the fast feedback.
The resulting equations are found by solving for $A/X$ from the block diagram below, with X representing the disturbance input:
$$Y = P(SY+FY+X)$$
$$A/S = P(A + FA/S + X)$...