Praise be to Allah.
There is nothing wrong with combining your money with your wife’s money and gold, then paying zakaah on the total. That is because the zakaah on money, gold and silver does not change, whether it is combined or dealt with separately, because what matters is paying one-quarter of one-tenth, whether there is a little wealth or a lot, so long as it has reached the nisaab.
Combining or separating wealth only makes a difference to zakaah in the case of an’aam animals (camels, cattle and sheep).
What you and your wife are doing with your salaries and paying zakaah on them and on the gold that she has in one month is best and is the easiest way of paying zakaah on one's salary.
What you have done by dividing your wealth by forty is also correct, because the rate of zakaah to be paid on gold and cash is one-quarter of one-tenth which is one in forty.
Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allaah have mercy on him) was asked:
There is a man who depends on his monthly salary; he spends some and saves the rest. How should he pay zakaah on this money?
He should write down what he saves of his salary, and pay zakaah on it when one year has passed. Zakaah should be paid on the savings of each month when one year has passed. If he pays zakaah on the total in the first month, there is nothing wrong with that and he will be rewarded for that, and it will be regarded as zakaah paid in advance for the savings for which one year has not yet passed. There is no reason why a person should not pay zakaah in advance if he sees some benefit in doing so. But delaying it after the year has passed is not permissible, unless there is a valid shar’i excuse, such as the wealth not being available or there being no poor people. End quote.
Tuhfat al-Ikhwaan bi Ajwabah Muhimmah tata’allaq bi Arkaan al-Islam (question no. 12)
For a detailed discussion about zakaah on one’s salary, please see question no. 26113, in which we quote a fatwa from the Standing Committee that is similar to the fatwa from Shaykh Ibn Baaz (may Allaah have mercy on him).
And Allaah knows best.