Ruling on saying “Life is no good”
Question

Does saying “Life is no good” come under the heading of inveighing against time?
Praise be to Allah.Firstly:
Prohibition on inveighing against time
It is proven that it is prohibited to inveigh against time, as is mentioned in the hadith of Abu Hurayrah (may Allah be pleased with him) who said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “Allah, may He be exalted and glorified said: ‘The son of Adam offends Me; he inveighs against time (dahr), and I am time, in My hand are all affairs, I alternate the night and day.’” Narrated by al-Bukhaari (4826) and Muslim (2246). According to a version narrated by Muslim: “Do not inveigh against time, for Allah is time.”
The reason for this prohibition is that this inveighing includes one of two grave evils: by saying this, the one who is inveighing is either attributing the creation of events to time, in which case he is associating something else with Allah, may He be exalted, or he believes that these events, for which he is inveighing against time, are decreed by Allah, may He be exalted, in which case he is condemning Allah, may He be exalted – we ask Allah to protect us from that.
Ibn ‘Abd al-Barr (may Allah have mercy on him) said:
Ash-Shaafa‘i said, commenting on that – and Allah knows best – that the Arabs used to inveigh against time and condemn it when calamities befell them, such as death, destruction, loss of wealth or other calamities. They would say: We have been struck by the vicissitudes of time, time has eradicated them, time has struck them, and nights and days are doing that to them. Thus they condemned time and inveighed against it.
The Messenger of Allah (blessings and peace of Allah be upon him) said: “Do not inveigh against time (dahr),” thinking that it is time that is doing that to you, for if you inveigh against the one that does that, then you are inveighing against Allah, may He be glorified and exalted, for He is the One Who does all of that, for He does all things and nothing happens except what Allah, the Most High, the Almighty, wills." (al-Istidhkaar 27/310).
Ibn al-Qayyim (may Allah have mercy on him) said:
The one who inveighs against time inevitably falls into one of two errors: either he is inveighing against Allah or he is associating something with Him.
If he believes that time does things alongside Allah, then he is a mushrik (one who associates others with Allah), and if he believes that Allah alone is the One Who does that, and he is inveighing against the one who does it, then he is inveighing against Allah." (Zaad al-Ma‘aad  2/324).
Secondly:
The ruling on saying “Life is no good.”
The reason for the prohibition mentioned above is not applicable in the case of saying “Life is not good,” because in this phrase there is no attribution of any action to this life for which it may be condemned. Rather it is just describing what a person feels towards life. But we should look at what he means and what prompted him to say that. If it is by way of expressing discontent and lack of patience in bearing the decrees of Allah, may He be exalted, in this life, this is not allowed, as is well known to every Muslim. 
But if his aim in saying this is to convince himself of how insignificant this life is, and that man is constantly striving and toiling in this life, and that rest and a true, beautiful life is only to be found in Paradise, so he is saying that there is no goodness in this life in comparison to life in Paradise, then this is something that is acceptable according to Islamic teachings, as we see in the verse in which Allah, may He be exalted, says (interpretation of the meaning):
{Say, The enjoyment of this world is little, and the Hereafter is better for he who fears Allah. And injustice will not be done to you, [even] as much as a thread [inside a date seed]} [an-Nisa’ 4:77].
There is a great deal of condemnation of this life in the religious texts and the words of the righteous, which speak against being attached to it, highlight the troubles man faces in it and condemn those who are attached to it and distracted by it from obedience to Allah and seeking the path that leads to Paradise.
The Prophet (blessings and peace of Allah be upon him) said: “This world is cursed and everything in it is cursed, except remembrance of Allah and what is connected to that, or a knowledgeable man, or a seeker of knowledge.” Narrated by at-Tirmidhi (2322), who said: It is hasan ghareeb. It was also classed as hasan by Ibn al-Qayyim in ‘Iddat as-Saabireen (260) and by al-Albaani in as-Saheehah (2797).
It was narrated that Jaabir ibn ‘Abdillah (may Allah be pleased with him) that the Messenger of Allah (blessings and peace of Allah be upon him) passed through the marketplace, coming in from part of al-‘Aaliyah, and the people were around him. He passed by a dead lamb with very small ears, and he took hold of its ear and said: “Who among you would like to have this for a dirham?” They said: We would not like to have it for anything; what would we do with it? He said: “Would you like to have it?” They said: By Allah, even if it were alive, it has a defect because its ears are too small, so how about if it is dead? He said: “By Allah, this world is more insignificant to Allah than this is to you.” Narrated by Muslim (2957).
Conclusion: there is nothing wrong with saying that or condemning this world by way of highlighting how insignificant it is and how bad it is to be distracted by it from seeking the pleasure of Allah, may He be glorified and exalted, and by way of [??] feeling sad for what one misses out on of its glamour and gains.
And Allah knows best.