In Meseches Kiddushin 80b it's written:
And the Rabbis, who render seclusion forbidden even then, hold in accordance with the statement of Rabbi Yitzḥak, as Rabbi Yitzḥak says as follows with regard to the verse: “Why does a living man complain, a powerful man due to his sins?” (Lamentations 3:39): Even at the time of a person’s acute mourning, his inclination to sin overpowers him. The Gemara asks: And how does Abba Shaul explain this verse? The Gemara answers: When that was written, it was written with regard to one who complains about God’s ways. And this is what the verse is saying: Why does one complain about God’s ways and claim that he has been treated unjustly? Has he overpowered his sins? God responds: The life I have given him is sufficient for him, and he deserves no more. (Translation from Sefaria).
At the very least, Abba Shaul would answer your question by saying that since you have sinned, there is no justification for you to complain. It's also very possible that the Rabbis agree with Abba Shaul on this point but disagree on how to interpret this particular pasuk (Lamentations 3:39).
[The Rambam (avel 12:10) paskens like the Rabbis that it's assur to melaveh a meis with 2 women and 1 man even during aninus. The Ohr Zarua (chelek beis siman 422) paskens like Abba Shaul that it is permitted to melaveh a meis with 2 women and 1 man because it's during aninus because the straightforward interpretation of the pasuk is like Abba Shaul and not like the Rabbis.]
Another Gemara that might provide us with an answer is Moed Katan 27b [which is referenced by Rashi in Kiddushin 80b as being connected to Abba Shaul according to a certain girsa of the Gemara]. It's written in Moed Katan 27b:
And Rav Yehuda said further in the name of Rav: Anyone who grieves excessively over his dead and does not allow himself to be consoled will in the end weep for another person. The Gemara relates that a certain woman who lived in the neighborhood of Rav Huna had seven sons. One of them died and she wept for him excessively. Rav Huna sent a message to her: Do not do this. But she took no heed of him. He then sent another message to her: If you listen to me, it is well, but if not, prepare shrouds for another death. But she would not listen and they all died. In the end, when she continued with her excessive mourning, he said to her: Since you are acting in this way, prepare shrouds for yourself, and soon thereafter she died. (Translation from Sefaria).
The Meiri explains that the reason why "Anyone who grieves excessively over his dead and does not allow himself to be consoled will, in the end, weep for another person" is because (it looks as though) the person is angry and is complaining as it were about how God is acting, so to speak, in the world. Rashi in Kiddushin 80b gives a similar explanation of Moed Katan 27b.