Praise be to Allah.
What the Muslim should do is earn his living with his own hands, and refrain from taking people’s wealth. It is not the characteristic of the Muslim to look for the wealth that is in other people’s hands, let alone take it unlawfully. If a Muslim is living in a non-Islamic state, then it is even more necessary for him to refrain from taking their wealth, and he should not humiliate himself by seeking the help that these countries offer to those who are unemployed, as working hard and striving to earn a living is better for him than humiliating himself.
Al-Khateeb al-Baghdaadi narrated in Tareekh Baghdaad (10/160) that ‘Ali ibn al-Fudayl said: I heard my father say to Ibn al-Mubaarak: You enjoin asceticism upon us, and making do with little, but we see you bringing goods from Khorasaan to the land of al-Haraam [Makkah]. How is that? Ibn al-Mubaarak said: O Abu ‘Ali, I only do that to protect my dignity and my honour, and I seek help thereby to obey my Lord. I do not see any duty to Allah but I hasten to do it. al-Fudayl said to him: O Ibn al-Mubaarak, how good it is if you do this!
With regard to taking help (benefits) from the government – whether it is Muslim or not – when you are not entitled to it and you do not meet the conditions stipulated, that is haraam wealth and you must avoid it.
Allah has commanded us to fulfil covenants and promises, even with the disbelievers. Allah says (interpretation of the meaning): “O you who believe! Fulfil (your) obligations” [al-Maa’idah 5:1]. Between you and the state there is a covenant whereby entitlement to this money is subject to conditions, so the conditions must apply to you in order for their wealth to become permissible for you.
If a person is working and has a salary, then he is not entitled to any help (benefits). If he does not work despite the availability of opportunities for permissible work, then the help is also haraam for him.
With regard to your situation in particular: If you want the money to be permissible, then give up this haraam job in order for these conditions of receiving help to be applicable to you. If a person finds work in a mixed environment, or in a brewery, or in a restaurant that sells haraam meats, he is not regarded as having found work, because it is haraam for him to take that job and there is nothing wrong with him accepting help in that case; that is less serious than earning a haraam income or the possibility of facing fitnah (temptation) from the opposite sex.
And Allah knows best.