The Idea in Brief
There are three words in the verse which provide ambiguous meaning, however, the Masorah Parva of the Masoretic Text helps to shed light to the verse. In spite of these difficulties, the MT can be seen to yield good sense.
Discussion
The first and most significant problem in the verse is the word for "friend." If the Hebrew word is רֵעַ, then the word also contains the prefix מִן (or מֵ), which in conjunction with the possessive masculine suffix means from-his-companion. (The translators of the Syriac, Latin, and Greek versions of the Hebrew Bible inferred this meaning.) If the word here, however, for "friend" is מֵרֵעַ, then the word in conjunction with the possessive masculine suffix means his friend. In other words, both words in the Masoretic Text appear exactly alike (and both refer to companion/friend, respectively), but one contains a preposition and the other one does not.
Another problem is the phrase לַמָּס, which means to (for) one despairing. In lieu of this word, and based on multiple manuscripts, the editors of the BHS have suggested the Qal infinitive construct of לִמְאָס, which means despising, grudging, scorning. The evidence for this variant is provided in de Rossi's Variae lectiones Veteris Testamenti... (1788), vol. 4 p. 106:
According to Gensenius ( §114f, §114o, and §115e), if in fact the infinitive construct (as in our case with לִמְאָס) were present in this verse (and as suggested by the editors of the BHS and found in a number of Hebrew manuscripts), then the clause of this verse could read as follows, since the noun in the clause could function as the subject of the infinitive construct.
(1) In refusing his companion (=>מֵרֵעַ) compassion, thus he (the friend Eliphaz) forsakes the fear of the Almighty.
(2) In withholding compassion from his friend (=>רֵעַ), thus he (Job) forsakes the fear of the Almighty.
N.B. The conjunction which connects both clauses (within gnomic poetry) is the waw copula (Gesenius §161a).
There is yet a third factor to consider before concluding this discussion. At the end of the second clause appears the verb יַעֲזוֹב, which for ancient Hebrew contains the waw Matre Lectionis. These letters are sometimes known as consonants, but they have been "helpers" to identify vowels (begun at a time before the Masoretes added the vowels and accents and spaces between words). Waltke and O'Connor explain the sporadic nature of these "helpers" as now present in BHS. That is, the proto Masoretic Text had no vowels and spaces, which had led to confusion with homophonic words (such as the example with the two words for "friends" as noted above).
Anyway, in the margin of Job 6:14 of the BHS appears the Masorah Parva, which should correspond to references to the Masorah Magna at the foot of the Hebrew Text (which provide more amplification of meaning and references). In this instance, in the Parva (marginalia) there are only the words ב̇ מל̇ בליש written in Aramaic, which phrase reads that this particular verb appears in the Masoretic Text "twice written out with vowel letters in Hebrew." At the foot of the text there is no corresponding Masorah Magna to reference. The editor of the Masorah in BHS (Georg Weil) annotated "Mp (Mesora Parva) sub loco," which means that there is some sort of problem with it, and there is no related listing for this reference in the Masorah Magna.1
Weil died before he could produce the volume in which these (many) "sub loco" entries would be discussed. Many of them remain obscure,2 and it isn't clear what Weil intended to note for יַעֲזוֹב in Job 6:14. BHS is meant to reproduce Codex Leningradensis, but it reads this way:
Here, the marginal note (meaning "unique occurrence [of this form]") is, in fact, correct, and appears this way in other medieval Hebrew manuscripts. Oddly, however, the highly esteemed Aleppo Codex has this:
Here, the marginal note suggests there are two occurrences of this form. This is, in fact, an error (unless the "missing" part of this codex contained a second example: the same form but with the "defective" spelling, i.e., no vowel letter, occurs in Genesis 2:24). Perhaps this is the "problem" that Weil had in mind, but we can only guess.
Finally, in Job 6:14-20 appear in narrative format in the third person, which includes the verse under discussion. That is, Job is alluding to himself and/or his companions in the third person until Job 6:21, when he then begins to address the three "friends" in the second person.
Conclusion
In summary, while there is no exacting certitude as regards the "correct" translation of this verse, the editors of BHS provide an alternate reading for לַמָּס in order to facilitate the smooth reading of the verse. In this regard, then, the NASB takes and assumes the Masoretic Text as the correct reading, which assumes the verb in the first clause is רֵעַ, which contains the prefix מִן (or מֵ):
Job 6:14 (NASB)
14 For the despairing man there should be kindness from his friend;
So that he does not forsake the fear of the Almighty.
While there is grammatical ambiguity of the precise nature of the wording of this verse (because of homophonic-sounding words in Biblical Hebrew), the meaning notwithstanding still comes out quite clear: Instead of helping Job as a friend/companion, Eliphaz was provoking Job to react toward the Lord.
1 When we check the Interlinear Scripture Analyzer (http://www.scripture4all.org), we find that another appearance of this verb in the Masoretic Text is 2 Ki 21:22. There we find that King Amon forsook the Lord. This verb does not contain the waw Matre Lectionis, however. In other words, there are only two places in the Hebrew Bible that the verb appears in reference to rejecting/forsaking the Lord: Job 6:14 and 2 Ki 21:22.
2 One monograph has appeared which attempts to work through the examples in the Pentateuch: D.S. Mynatt, The Sub Loco Notes in the Torah of the Biblia Hebraica Stuttgartensia (BIBAL Press, 1994).