I have searched everywhere I know to look but I cannot find out how Hamilton's equations deal with non-conservative forces. In my understanding, Lagrangian mechanics deals with this as follows: the Euler-Lagrange equations no longer have a zero on the right, they have a term $$\Sigma F_q$$ that is the sum of all the non-conservative forces encountered in the direction of the coordinate q.
\begin{equation} \frac{d}{dt} \frac{\partial L}{\partial \dot{q}} - \frac{\partial L}{\partial q}=\Sigma F_q(t) \end{equation}
The only document I have been able to find about how hamiltonian mechanics deals with non-conservative forces has been: https://doi.org/10.1007/BF00692025
It requires you to buy it and I felt like just the plain equations and a little context for an example like a box sliding down a hill against friction would be enough.