The most likely meaning of metaphor in this sentence is that Amit's thoughts are confused and contradictory.
A Metaphor is the use of two contradictory words or ideas for the sake or purpose of emphasis. Examples are; all the world is a stage, John is a lion in the fields, Mary is a Chameleon, etc.
From the passage, the "river and the waves crashing" is metaphorical as it depicts Amit's feeling of confusion and disorder. Amit's wished Tamar never told him his secret as his thoughts are now in a state of clash and worry.
The waves and the water symbolize Amit's confusion and contradictory in his mind because the waves are crashing into each other and against each other.