Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
We ask Allah, the Lord of the Throne to comfort you, protect your chastity, make your problems easy and keep you and us as well, away from trials and from Satanic incitement to evil. The first and basic solution for your problem is only to get married even if this requires that you borrow some money. Try your best to earn money that could help you get married. Till you marry you have to fast as much as possible since the Prophet (Sallallahu Alaihi wa Sallam) said: O young people! Whoever among you can marry, should marry, because it helps him lower his gaze and guard his modesty (i.e. his private parts from committing illegal sexual intercourse etc.), and whoever is not able to marry, should fast, as fasting diminishes his sexual power. [Al- Bukhari]
In addition, you have to be in the company of good people and keep away from every thing erotic. Make yourself busy in useful acts and knowledge, keep away from being alone and seek Allah’s help, He will surely help you.
As for masturbation, please read the Fatwa: 81150 and 82271.
We do not know the opinion of Sheikh al-Qardawi but even if he holds such an opinion we have to opt for the proofs of Shariah over the opinion of scholars.
Allah knows best.