Will You Be Forgiven If You Mistreat Your Parents in Islam?
Question

If someone treated his parents badly, then realised his mistake after they died, what should he do so that he might be forgiven?
Praise be to Allah.Disobedience towards parents is a major sin
`Abd Ar-Rahman ibn Abu Bakrah that his father (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him)) said: “Shall I not tell you of the greatest of major sins?” We said: Yes indeed, O Messenger of Allah. He said: “Associating others with Allah (Shirk) and disobedience towards parents .” He was reclining, but then he sat up and said, “And – indeed – false speech and false testimony, and – indeed – false speech and false testimony,” and he kept on saying it until I thought he would never stop. (Narrated by Al-Bukhari, 5631; Muslim, 87) 
`Abdullah ibn `Amr narrated that the Prophet (blessings and peace of Allah be upon him) said: “The major sins are: associating others with Allah, mistreatment of parents, murder and a false oath sworn knowingly [which will cause a person to be dipped in the hellfire]. (Narrated by Al-Bukhari, 6675)
Mistreatment of parents refers to that which the son does or says – without any Shar`i justification –that causes hurt to his parents.
Ibn Hajar (may Allah have mercy on him) said: “What is meant by mistreatment of parents is any word or deed  on the part of the son which causes hurt to the father, except in the case where he instructs him to associate something with Allah or commit sin." (Fath Al-Bari  10/406)
Will you be forgiven if you mistreat your parents in Islam?
One of the important issues of Islamic belief (`Aqidah) that the Muslim should understand, believe in, and act in accordance with is that it is possible to repent from any sin, no matter how great.
Allah, may He be exalted, says (interpretation of the meaning):
{Say, “O My servants who have transgressed against themselves [by sinning], do not despair of the mercy of Allah. Indeed, Allah forgives all sins. Indeed, it is He who is the Forgiving, the Merciful.”} [Az-Zumar 39:53]
So all this person who mistreated his parents has to do now is hasten to repent, for Allah, may He be Exalted, has promised to accept the repentance of the one who repents. Allah, may He be exalted, says (interpretation of the meaning):
{And it is He who accepts repentance from His servants and pardons misdeeds, and He knows what you do} [ash-Shura 42:25].
Conditions of sincere repentance in Islam
In order for his repentance to be sincere and accepted, it is essential to fulfil the conditions thereof.
An-Nawawi (may Allah have mercy on him) said:
The scholars said: Repentance from every sin is essential. If it is something between a person and Allah, may He be Exalted, and has nothing to do with the rights of another person, there are three conditions of repentance : 

He should give up the sin
He should regret having done it
He should resolve never to go back to it.

If one of these three is missing, then his repentance is not sincere." (Riyadh As-Salihin  p. 14)
But one may raise the issue that some of these conditions cannot be fulfilled after the death of the parents.
The response to that is twofold:
The first point is that in such a case, regret alone is repentance . `Abdullah ibn Ma`qil ibn Muqarrin (may Allah have mercy on him) said: I went with my father to visit `Abdullah ibn Mas`ud (may Allah be pleased with him), and I heard him say: The Messenger of Allah (blessings and peace of Allah be upon him) said: “Regret is repentance.” (Narrated by Ibn Majah (4252) and Ahmad (6/37); classed as authentic by Al-Albani in Sahih Sunan Ibn Majah)
Ibn al-Qayyim (may Allah have mercy on him) said:
“One of the rulings on repentance is that if the sinner no longer has the means of committing the sin and it is now beyond him, meaning that it is impossible for him to do it, is repentance valid? Examples of that include the liar, the slanderer and the one who gives false testimony, if their tongues are cut out… And the one who reaches a state where he no longer has any motive to commit a sin that he used to commit.
Concerning that there are two scholarly views…
The second view – which is the correct view – is that it is possible for him to repent sincerely, because the only element of repentance that is possible in his case is regret. In Al-Musnad it is narrated from the Prophet  (blessings and peace of Allah be upon him) that: “Regret is repentance.” So if he truly regrets the sin, and blames himself for it, then this is repentance. How can it be truly said that he cannot repent, when he greatly regrets the sin and blames himself for it?” (Madarij As-Salikin (1/741-746)
This is the view of the majority of scholars. Shaykh Al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
“The repentance of one who is unable to act - such as the repentance of the one whose penis has been cut off from adultery (or fornication), and the repentance of the one whose hand has been cut off and he is no longer able to steal, and others who are similarly incapacitated and can no longer commit the sin in question – is valid and acceptable according to the majority of scholars among Ahl As-Sunnah and others." (Majmu` Al-Fatawa 10/746).
How to honour parents after their death 
By Allah’s mercy towards the Muslims, He has ordained that the door of reward for honouring parents is not closed when they die, so the son who had fallen short can strive to do whatever he is able to do of honouring them .
The ways of honouring parents after their death include the following:

Offering a great deal of supplication (du `a’) for them. Allah, may He be exalted, says (interpretation of the meaning):

{…and say, “My Lord, have mercy upon them as they brought me up [when I was] small”.} [Al-Isra’ 17:24]
Abu Hurayrah (may Allah be pleased with him) narrated that the Messenger of Allah (blessings and peace of Allah be upon him) said: “When a man dies, all his good deeds come to an end except three: ongoing charity (Sadaqah Jariyah), beneficial knowledge, or a righteous son who will pray for him.” (Narrated by Muslim, 1631)
This supplication is one of the greatest ways of showing kindness to parents.
Abu Hurayrah (may Allah be pleased with him) narrated that the Messenger of Allah (blessings and peace of Allah be upon him) said: “A man will be raised in status in Paradise and will say, `Where did this come from?’ And it will be said: `From your son’s praying for forgiveness for you.’” (Narrated by Ibn Majah, 3660; classed as sound by Al-Albani in As-Silsilah As-Sahihah, 4/129)

Doing righteous deeds so that the reward thereof will reach them such as giving charity on their behalf , or doing Hajj and `umrah on their behalf . 

If they had left behind any debts or things that had been entrusted to them, then the son should strive hard to pay them off on their behalf. Or if they had wronged any people, he should ask those who were wronged to pardon them and he should seek to settle the matter with them.

Honouring their friends and loved ones. It was narrated from `Abdullah ibn Dinar (may Allah have mercy on him), from Ibn `Umar (may Allah be pleased with him), that when Ibn `Umar set out for Makkah, he had a donkey with him that he would ride for a change when he tired of riding his camel, and he had a turban that he wrapped around his head. One day whilst he was riding that donkey, a Bedouin passed by him and he said: Aren’t you So and so the son of So and so? He (the Bedouin) said: Yes. He gave him the donkey and said: Ride this, and he gave him the turban and said: Wrap this around your head. Some of his companions said to him: May Allah forgive you, you have given this Bedouin a donkey that you were riding for a change and a turban that you had wrapped around your head. He said: I heard the Messenger of Allah (blessings and peace of Allah be upon him) say: “One of the best acts of righteousness is for a man to uphold ties with the friends of his father after he (the father) dies.” And his father was a friend of `Umar’s. (Narrated by Muslim, 2552)

And Allah knows best.