If, G-d forbid, a wife learned of a terrible tragedy while a niddah, is there any possibility that her husband could hug her?
To be clear, I am asking for respected sources that look at this matter leniently, if such exist.
A man hugging a woman who is a nidda is more severe than הרחקות. It is actually קריבה לעריות. I think that would eliminate your question.
The sources of the following are Bet Yosef YD 195, Shach (YD 195 sk 20, 157 sk 10) and Minchat Yaakov, Sidre Tahara at the same siman, Rambam, Ramban, Megilat Esther Lavim 353. Chinuch 188, Bet Smuel EH 20 sk 1,
The laws of harchakot from the wife nidda presents similarities with arayot and differences. In some point of view those differences can lead to leniency but from an other point of view they may lead to stringency. To know very good his wife can facilitate the the process leading to a intimate relationship and also can diminish the drive. The fact that this woman is his wife or the fact that the Isur nidda is not a "marriage prohibition" may make it lighter than other isure bia.
My plan is:
1. How the Bet Yosef explained the Machloket between Rishonim regarding the permission to allow a husband who is physician to examine and treat his nidda wife the Rishonim who allows is Ramban in Shut 127. Bet Yosef identified the stringent opinion to Rambam in a known Machloket Rambam - Ramban about Arayot. He interpreted the leniency of the lenient opinion as a permission when there is no other physicians and the matsav is pikuach nefesh. 2. The RMA ruled as the lenient opinion.
3. The Shach opposed to Bet Yosef an other understanding of the Machloket Rishonim regarding the nidda's husband physician. He said that both opinions can be congruent to Rambam or Ramban indifferently concerning their argument about Arayot.
4. He proved his opinion by the fact than RMA stated as Rambam in Arayot (YD 157, 1) and as the lenient opinion regarding nidda medical care. Medical care has no link with arayot. The question of Arayot for Rambam itself begins only when touching act born of sexual drive. The harchakot of nidda concerning non sexually characterized contact are derabanan. 5. The Minchat Yaakov explained that Bet Yosef see the care of the wife by her husband as a problem of sexual character because of the great proximity between the both. Even if a physical examination of an other woman has no sexual features. The Bet Shmuel EH 20 sk 1 k (which is indicated by the Dagul Merevava on the Shach YD 195, sk 20, the BS is very explicit in his language and seems to read as th BetYosef assumption in the Shut Haramban.) also rejected the argument of the Shach against Bet Yosef. Sidre Tahara also sustained the Bet Yosef 's opinion.
The answer of @Moshe that hugging is kreva learayot follows the Rambam. Therefore the Shach stated that taking pulse to his wife is no more than harchakot, he probably agrees about hugging. Additionally, to give hug his wife is not harmless as a physical is also not not a case of sakana, and RMA specified "sakana becholiah", Shach also fixed sakana as a necessary condition for allowing any "medical touching".
The text of Bet Yosef.
Bet Yosef YD 195.
וכתב עוד בתה"ד בשם גדול אחד דאשה חולה ובעלה רופא אסור למשש לה הדפק
ונראה מדבריו שאפי' בשאין רופא זולתו אסור
וגם בתשובות דלהרמב"ן סימן קכ"ז אסור לבעל למשש דפק אשתו נדה ואע"פ שלשון השאלה היה בשיש שם רופאים אחרים אלא דבעלה ניחא לה משום דמזומן תדיר נראה דלמאי דאסר ל"ש לן בין יש שם רופאים אחרים לאינם
ומיהו אם החולי מסוכן ואין שם רופאים משמע קצת מדבריו דשרי משום פיקוח נפש
. Machloket Rambam Ramban if touching a nidda is prohibited from Tora or from Rabanan. Bet Yosef identify negiat erva and negiat nidda.
אלא דאיכא למימר דלטעמיה אזיל דסבר דנגיעת נדה אינה אסורה אלא מדרבנן
. Ramban followed his own opinion about kreva to Arayot which is
אבל להרמב"ם דנגיעת ערוה אסורה מן התורה הכא אע"פ שיש בו פיקוח נפש איפשר דאסור משום דהוי אביזרא דג"ע וצ"ע :
. Bet Yosef said that possibly Rambam prohibited to take care of the wife even in Pikuach nefesh but leaves the question open.