Hello. I'd like to know how to distinguish between these two meanings of such. How do I know which sentence below to which meaning? Sometimes I feel that it's not simple because I think that both meanings can be embedded in the sentence.

Meaning 1) Of the same kind.
Meaning 2) Of so extreme a degree or quality.

He had never seen such high mountains. -> could it be: so high mountains or/and the same mountains that I saw one day.
He has never made such mistakes before. -> could it be: so big mistakes or/and the same mistakes that I made one day.
I've never seen such a funny thing. -> could it be: a thing so funny or/and the same funny thing that I saw one day.
He had no strength so bear such grief. -> could it be: a grief so extreme or/and a grief that I felt before.
(1) would modify a noun and (2) would modify an adjective or adverb.

In your first 3 examples, it could only be the first answer, since the sentence itself states that the speaker 'had never seen/made' before; similarly with the 4th-- the speaker, if he had experiences so extreme a grief earlier, had indeed borne it.
Site Hint: Check out our list of pronunciation videos.
MrM, I'm sorry but I'm still confused when such modifies a noun, cause I've checked several dictionaries on the net and all have little differences that bother me. So I'll try to make a simple summary of this.

* You put an A before a singular noun, and you don't put an A before an uncountable noun to refer to "the same kind or type" or "to add emphasis". So we have:

There is such beauty and mystery here.
She usually doesn't receive such criticism.

We never saw such a day.
Fred is such a clown!

* On the other hand, when such modifies an adjective or adverb, to refer to "to so extreme a degree", it's the same story, A before countable and nothing before uncountable:

He's such a good athlete.
I've never seen such an exciting film.

They're such good friends.
How could you say such horrible things to me?

Could you check my interpretation?
'A/an' before countable nouns, with or without another adjective.
No article before uncountable or plural nouns, woith or without another adjective.

Such a friend
Such an old friend
Such water
Such good water
Such friends
Such old friends

Nothing unusual there, Latin-- just like normal article usage.