Sorrow can function as both a noun and a verb. As a noun, it refers to a feeling of deep distress or sadness. As a verb, it means to feel deep distress or sadness.
The word "sympathy" is a noun. It refers to feelings of pity and sorrow for someone else's misfortune.
Such is a predicate adjective (also referred to more generally as a subject complement). It modifies Sorrow, which is the subject of this sentence. The order of this sentence is inverted from the typical English, which would be " Her sorrow is such." Therefore, sorrow in this case is an adjective because it modifies a noun.
"Tragic" is an adjective. It is used to describe something that is extremely sad, distressing, or causing deep sorrow.
Sadly is an adverb. It is used to modify or describe verbs, adjectives, or other adverbs by indicating a sense of sorrow, regret, or disappointment.
"Regret" can function as both a noun and a verb. As a noun, it refers to the feeling of sadness or disappointment over something that has happened or been done. As a verb, it means to feel sorrow or remorse for something. The context in which it is used determines its part of speech.
melancholy is an adverb.
The word ruefully is an adverb. It means to do something in a rueful manner.
Lamentable is an adjective. The -able ending is used to form adjectives. Other examples are laughable and regrettable.
part of speech
The part of speech for this particular word is a noun.
The part of speech for "answer" is a noun.
adverb