The poem is built around a small, odd scene: a drunk has come down to the shore to be sick, and the sea seems to speak to him the way an older brother might. There's no scolding in it. The sea is imagined as someone who has seen this kind of trouble before and isn't shocked by it.
The last three lines are the heart of it, and they can be read a few ways. The sea might be telling the man that it isn't melancholy to feel such a great ache. In other words, his pain is large, but it isn't a flaw or something shameful. It could also be the speaker's own thought, a quiet reassurance offered to the man or to himself.
The mood is tender and weary. The scene is unpleasant, but the poem treats it gently, as if grief and the body's mess deserve patience. The title, "Beached," suggests someone washed up and stranded, and the sea's calm company makes that feel a little less lonely.