A mud lark in the old days was a child who would stand below a bridge or a pier. Passers by would throw coins and the child would dive into the mud to retrieve them. It was a form of begging. Of course the mudlark would be covered in mud from head to foot.
In this sense it is metaphorical. The tougher things get the more you love him. You enjoy floundering around in this messy relationship. You are a masochist. You are willing to go through all sorts of pain just to get a few crumbs of affection.