Your definition could be fine if you remember that the state of a system in thermodynamic equilibrium can be identified by a pair of thermodynamic variables (as long as there is only one chemical species and one phase).
Namely, you can define internal energy as a function of two thermodynamic variables. A common choice of this pair of variables are volume (or density) and entropy, whatever it is,
$$U(V,S) \ ,$$
and taking the differential of this function, it's possible to write
$$dU = \left(\frac{\partial U}{\partial V} \right)_S dV + \left(\frac{\partial U}{\partial S} \right)_V dS \ , $$
identifying, for a gas, the partial derivatives with pressure and temperature (physical quantities you can measure with a barometer and a thermometer),
$$P = -\left(\frac{\partial U}{\partial V} \right)_S \qquad , \qquad T = \left(\frac{\partial U}{\partial S} \right)_V \ ,$$
to be consistent with the first principle of thermodynamics
$$\begin{aligned}dU & = \delta L + \delta Q = \\ & = -P dV + T dS \ , \\ \end{aligned}$$
While the relation above holds for every transformation, only for a reversible transformation on a gas system the relations $\delta L^{rev} = -P dV$, $\delta Q^{rev} = T dS$ hold.