No expert here, I've only been brewing and kegging a short time but I had similar issues.
I think I was over-carbing. I would set my regulator to 30 psi and gently rock the keg back and forth. It ended up very foamy as you describe. To fix the foamy beer, I disconnected both liquid and gas...