Regarding the issue of a person who has a fatal lust for prohibited relations. The following are relevant to the issue.
Sanhedrin (75a): Rab Judah said in Rab's name: A man once conceived a passion for a certain woman,3 and his heart was consumed by his burning desire [his life being endangered thereby]. When the doctors were consulted, they said, ‘His only cure is that she shall submit.’ Thereupon the Sages said: ‘Let him die rather than that she should yield.’ Then [said the doctors]; ‘let her stand nude before him;’ [they answered] ‘sooner let him die’. ‘Then’, said the doctors, ‘let her converse with him from behind a fence’. ‘Let him die,’ the Sages replied ‘rather than she should converse with him from behind a fence.’ Now R. Jacob b. Idi and R. Samuel b. Nahmani dispute therein. One said that she was a married woman; the other that she was unmarried. Now, this is intelligible on the view, that she was a married woman, but on the latter, that she was unmarried, why such severity? — R. Papa said: Because of the disgrace to her family. R. Aha the son of R. Ika said: That the daughters of Israel may not be immorally dissolute. Then why not marry her? — Marriage would not assuage his passion, even as R. Isaac said: Since the destruction of the Temple, sexual pleasure has been taken [from those who practise it lawfully] and given to sinners, as it is written. Stolen waters are sweet, and bread eaten in secret is pleasant.4
Rambam(Hilchos Yesodei HaTorah 5:9): A man who lusts after a particular woman and is dying because of this lust and the doctors say that there is no other cure except for him to have intercourse with her – it is better to let him die even if she is unmarried. Even to speak with her when she is behind a fence is not something we tell him to do. He should die rather than speak to her from behind a fence. Jewish girls should not be freely available because this will lead to a licentious attitude to sex
רמב"ם (הלכות יסודי התורה ה:ט):מי שנתן עיניו באשה וחלה ונטה למות ואמרו הרופאים אין לו רפואה עד שתבעל לו, ימות ואל תבעל לו אפילו היתה פנויה, ואפילו לדבר עמה מאחורי הגדר אין מורין לו בכך וימות ולא יורו לדבר עמה מאחורי הגדר שלא יהו בנות ישראל הפקר ויבואו בדברים אלו לפרוץ בעריות.