All perfect praise be to Allah the Lord of The Worlds. May His blessings and peace be upon our Prophet Mohammad and upon all his family and companions.
Plenty of good deeds draw a Muslim closer to Allah: Invocations, charities, slaughtering cattle, and the like. The objective behind doing these righteous deeds is obeying Allah, winning His Pleasure, asking Him to ward off affliction, and seeking relief from worry and grief.
Asking Almighty Allah by doing good deeds to achieve life interests, such as warding off worry, grief, seeking recovery, and increasing livelihoods are among the matters Allah (Law-Giver) guided us to do. He the Almighty said {What means}: "Saying, ’Ask forgiveness from your Lord; for He is Oft-Forgiving; "’He will send rain to you in abundance;" {Nuh, 10-11}.
Similarly, the Prophet (PBUH) taught us to be kind to the poor and weak to win Allah`s pleasure and blessings as regards achieving life interests, such as defeating the enemy and gaining livelihoods. This kindness is multi-faceted: a simple smile, affability, humility, and other acts of charity, or slaughtering animals to feed the poor. Narrated Mus`ab bin Sa`d: Once Sa`d (bin Abi Waqqas) thought that he was superior to those who were below him in rank. On that the Prophet (PBUH) said, "You gain no victory or livelihood except through (the blessings and invocations of) the poor amongst you."{Realted by Bukhari}.
It is stated in {Fateh Al-Bari Shareh Sahih Al-Bukhari, Vol.6:P.89}: "(You gain no victory or livelihood except through (the blessings and invocations of) the poor amongst you), Indeed, Allah blessed the Muslim nation with victory through the invocations, prayers, and devoutness of the poor. This is supported by the narration reported by Ahmad and Ansa`i on the authority of Abu DarDaa`, with the wording: (Rather, you gain no victory or livelihood except through (the blessings and invocations of) the poor amongst you). Ibn Battaal said: "This narration means that the poor are more sincere in invocation and more humbly submissive in worship, because their hearts aren`t attached to the adornments of worldly life." Also check {Merkat Al-Mafateeh, Vol.8:P.3274} by Mulla Ali Al-Kharee.
This idea is also attested to in the Hadith where the Prophet said: "Treat your sick ones with Sadaqa"{Related by Abu Dawoud}. This Hadith is traceable to the Prophet through a number of companions: Ibn Mas`oud, Obada Bin As-samit, Ibn Omar, and Somra Bin Jundob, as mentioned At-Tabarani, Abu Na`eim, Al-Jawzi, Al-Baihaqhi, and others. However, there is a dispute about the transmitters. In {Sho`ab Al-Emaan}, Al-Baihaqhi said: "The Prophet (PBUH) said: "Seek livelihoods from Allah through giving Sadaqa." He (PBUH) also said: "Delay not Sadaqa for calamities can`t overcome it."
In conclusion, it is permissible to ask Allah through offering acts of devotion, such as slaughtering animals with the intention of seeking relief from worry and grief, and this doesn`t contradict with being sincere in worshipping Him. And Allah the Almighty knows best.