If I am given a statistical system, then I can define state-variables like Energy, Entropy or other observables, and then I can (at least for equilibrium states) give the infinitesimal change of energy as:
$$ d E = T dS + K dx $$
Here x means any observable and K means the depending force, for example if x is the volume $V$, then K is minus the pressure $-p$. What I read all the time is
$$ d E = \delta Q + \delta W $$
Is there a general microscopic way to define what part of the above formula is $\delta W$ and what part is $\delta Q$ ?
For example, for reversible processes, $\delta Q = T dS$ and $\delta W = Kdx$. But what if I'm looking at an arbitrary process?