Wa `alaykum as-Salamu wa Rahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
Dear brother, thank you for your question and for your concern about the sufferings of your Muslim brother.
As for your question, no Muslim is allowed to have any physical contact with a woman outside marriage. Your friend should observe fasting on some days and keep himself busy with some sports or charitable activities imploring Allah Almighty to facilitate marriage for him.
Answering your question, Dr. Wael Shehab, PhD in Islamic Studies from Al-Azhar University and currently the Imam of the Downtown Toronto Masjid in Canada, states:
In fact, Islam forbids intimate relations between men and women out of the marriage bond. Allah Almighty says in the Qur’an, “And come not near unto adultery. Lo! It is an abomination and an evil way.” (Al-Israa’ 17:32)
Thus, Islam has taken a firm and decisive stance against zina (fornication or adultery). Islam not only prohibits zina, but also closes all the avenues and means leading to it. This is achieved by prohibiting every step and means leading to stimulating desires, opening ways for illicit sexual relations between men and women, and promoting indecency and obscenity.
So, this brother should fear Allah. He is advised to busy himself with the beneficial activities of the nearby Islamic center and to frequent the masjid. He should encircle himself with good Muslim brothers. He may involve himself in some studies or beneficial training.
He is advised also to make du`aa’ to Allah Almighty to make marriage easy for him. He may seek the local imam’s help and counseling too.
Finally, he may observe fasting on some days as the Prophet (peace and blessings be on him) instructed, “O you young men! Whoever is able to marry should marry, for that will help him to lower his gaze and guard his modesty.” (Al-Bukhari)
May Allah accept your and our good deeds!
Allah Almighty knows best.