I am having difficulty understanding this sentence. A comparison is being made to the effect that as the cruel feeling flowed out I washed the sea water out of the pants. But I am not sure about this. I understand that the だけ is the equivalent of ほど. But the sentence remains unclear to me.
そうすればしただけ、リエを泣かせた昼間の残酷な気持ちが流れ出ていくかのように、私はできるだけ丁寧に海水パンツを洗った.