All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
First of all, may Allaah reward you for being keen on working hard and honestly, for doing your job as best as you could, and for questioning yourself whether or not you have done what you should have done.
On the other hand, if what you mentioned about your husband is true, then he is wrong in many aspects:
1- Claiming to be a righteous person while he does evil; Allaah Says (what means): {O you who have believed, why do you say what you do not do? Great is hatred in the sight of Allaah that you say what you do not do.}[Quran 61:2-3]
2- His bad language and cursing his students: ‘Abdullaah ibn Mas’ood narrated that the Prophet said: "A believer is neither a slanderer nor a curser, nor is he obscene or vulgar." [Ahmad and At-Tirmithi] Indeed, this is inappropriate for him as he is educating those students, and he should be a good example for them.
3- Lying too much; the Prophet said: "Beware of lying, for lying leads to vice (wickedness, evil-doing), and vice leads to Hellfire, and a man continues to tell lies till he is written before Allaah, as a major liar." [Al-Bukhari and Muslim]
4- Gambling, which is a forbidden matter; Allaah Says (what means): {O you who have believed, indeed, intoxicants, gambling, [sacrificing on] stone alters [to other than Allaah], and divining arrows are but defilement from the work of Satan, so avoid it that you may be successful.}[Quran 5:90]
Hence, we advise you to endeavour to admonish him in the light of the above evidence as Allaah may guide him thanks to you.
As regards helping him with money, then you are not obliged to do so; rather, he is obliged to spend on you. If you are sure or you predominantly think that he takes the money from you to gamble, then it is not permissible for you to help him because Allaah Says (what means): {Help you one another in virtue, righteousness and piety but do not help one another in sin and transgression.}[Quran 5:2]
Allaah Knows best.