A couple got divorce and I said Alhamdulillah for that.I don't even know why I did that but I am really sorry for saying this. But the couple had a lots of trouble in their marriage. But still I am sorry for that. Will Allah forgive me?
Regarding the question you said at the end, will Allah forgive me: Every muslim should learn the ayahs of surah al zumar:
- Say: "O My servants who have transgressed against themselves! Despair not of the mercy of Allah, verily, Allah forgives all sins. Truly, He is Oft-Forgiving, Most Merciful.
- And turn in repentance ( and in obedience with true faith) to your Lord and submit to Him before the torment comes upon you, (and) then you will not be helped.
- "And follow the best of that which is sent down to you from your Lord, before the torment comes on you suddenly while you perceive not!
- Lest a person should say: "Alas, my grief that I was undutiful to Allah, and I was indeed among those who mocked.
- Or (lest) he should say: "If only Allah had guided me,I should indeed have been among those who have Taqwa.
- Or (lest) he should say when he sees the torment: "If only I had another chance, then I should indeed be among the doers of good.
- Yes! Verily, there came to you My Ayat and you denied them, and were proud and were among the disbelievers.
So, if you feel you have something you should ask forgiveness for, then keep asking forgiveness for it because Allah forgives, and tells us not to despair about not getting His mercy, subhanahu wa ta'aala.
There are lots of ways to do good deeds to make up for bad ones; du'a, prayer, fasting, charity, zikr, and so on; but the point is you should not despair that Allah will forgive because that is what Allah likes to do most.
2999 ( 64 ) (المجلد : 8 الصفحة : 227) حَدَّثَنَا هَدَّابُ بْنُ خَالِدٍ الْأَزْدِيُّ ، وَشَيْبَانُ بْنُ فَرُّوخَ ، جَمِيعًا عَنْ سُلَيْمَانَ بْنِ الْمُغِيرَةِ - وَاللَّفْظُ لِشَيْبَانَ - حَدَّثَنَا سُلَيْمَانُ ، حَدَّثَنَا ثَابِتٌ ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ أَبِي لَيْلَى ، عَنْ صُهَيْبٍ ، قَالَ : قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : " عَجَبًا لِأَمْرِ الْمُؤْمِنِ، إِنَّ أَمْرَهُ كُلَّهُ خَيْرٌ، وَلَيْسَ ذَاكَ لِأَحَدٍ إِلَّا لِلْمُؤْمِنِ ؛ إِنْ أَصَابَتْهُ سَرَّاءُ شَكَرَ فَكَانَ خَيْرًا لَهُ، وَإِنْ أَصَابَتْهُ ضَرَّاءُ صَبَرَ فَكَانَ خَيْرًا لَهُ ".
The Messenger of Allah (ﷺ) said, "How wonderful is the case of a believer; there is good for him in everything and this applies only to a believer. If prosperity attends him, he expresses gratitude to Allah and that is good for him; and if adversity befalls him, he endures it patiently and that is better for him".
All cases for a believer is good and it is not something uncommon if you read what some old scholars said when they encountered a tragedy to say Alhamdullah it represents the accept ance of Allah destinies either bad or good. So you did not do a sin.