In the Catholic Church, is having ideations to sin a mortal sin? In other words, would a faithful Catholic have to repent during Confession for having ideations to sin or having attempted, but failed, to act on such ideations?
"Ideations" in the question "Can having 'ideations' to sin ever be mortally sinful?" could mean "passions of the soul," which are causes of sin.
Now, can a sin committed through passion ever be mortal? St. Thomas Aquinas explains (Summa Theologica I-II q. 77 a. 8 c.):
Mortal sin, as stated above (q. 72, a. 5), consists in turning away from our last end which is God, which aversion pertains to the deliberating reason, whose function it is also to direct towards the end. Therefore that which is contrary to the last end can happen not to be a mortal sin, only when the deliberating reason is unable to come to the rescue, which is the case in sudden movements. Now when anyone proceeds from passion to a sinful act, or to a deliberate consent, this does not happen suddenly: and so the deliberating reason can come to the rescue here, since it can drive the passion away, or at least prevent it from having its effect, as stated above: wherefore if it does not come to the rescue, there is a mortal sin; and it is thus, as we see, that many murders and adulteries are committed through passion.
So, if your reason tells you committing a mortal sin is bad, yet you consent to it or actually commit it anyways, this itself is a mortal sin.
While having a sinful desire is not a sin by itself, to willingly dwell in such desires—which amounts to actively listening to the Devil—is a sin.
For instance, if you see an object of desire, and immediately are tempted to sin, there is no sin in this: but if you then indulge in imagining the sinful act, then it is a sin, because you are willingly endangering your own soul.
The Church teaches that the main weapon we have against temptations is prayer.
Baptism confers on its recipient the grace of purification from all sins. But the baptized must continue to struggle against concupiscence of the flesh and disordered desires. With God’s grace he will prevail:  by the virtue and gift of chastity, for chastity lets us love with upright and undivided heart;  by purity of intention which consists in seeking the true end of man: with simplicity of vision, the baptized person seeks to find and to fulfill God’s will in everything;  by purity of vision, external and internal; by discipline of feelings and imagination; by refusing all complicity in impure thoughts that incline us to turn aside from the path of God’s commandments: “Appearance arouses yearning in fools” (Wis 15:5);  by prayer: I thought that continence arose from one’s own powers, which I did not recognize in myself. I was foolish enough not to know [...] that no one can be continent unless you grant it. For you would surely have granted it if my inner groaning had reached your ears and I with firm faith had cast my cares on you. (St. Augustine, Confessions VI.11.20, PL 32.729-730)
(Catechism of the Church, § 2520)
Such a battle [against temptation] and such a victory become possible only through prayer. It is by his prayer that Jesus vanquishes the tempter, both at the outset of his public mission and in the ultimate struggle of his agony. In this petition to our heavenly Father, Christ unites us to his battle and his agony. He urges us to vigilance of the heart in communion with his own. Vigilance is “custody of the heart,” and Jesus prayed for us to the Father: “Keep them in your name.” The Holy Spirit constantly seeks to awaken us to keep watch. Finally, this petition takes on all its dramatic meaning in relation to the last temptation of our earthly battle; it asks for final perseverance. “Lo, I am coming like a thief! Blessed is he who is awake.”
(Catechism of the Church, § 2849)
On one level, the answer to this question is succinctly provided in the Sermon on the Mount, specifically where the teaching in Matthew 5:27-30 includes "whoever looks at a woman lustfully has already committed adultery in his heart". But I understand that the degree of sinfulness of suicidal thoughts today might be evaluated with consideration given to whether or not the person who had the thoughts did so willfully, or not. For example, since suicidal thoughts are a known side effect of certain anti-depressant medications, someone taking those medication who has suicidal thoughts may not be committing a sin.
As to whether a Catholic would have to confess having those ideas, the answer is likely to be something on the order of "Why not? Can't hurt."
First and foremost, Confession not a sacrament in which you just list out your sins- of commission and omission- and ask for forgiveness. The sacrament is also meant to help you build up resistance to the sinful nature. For that matter, by confessing that you have knowingly or unknowingly contemplated to commit a sin, be it suicide, murder or theft, you are seeking the counsel of the priest in avoiding such thoughts in future.
By the way, seriousness of the ideation varies from situation to situation. For instance, failed attempt to commit suicide could be treated with equal seriousness as `succeeding' ,in the attempt.
The very fact that it is obligatory for Catholics to make the sacrament of Confession at least once in a year, adequately explains that Confession does work in the form of a spiritual vaccination. After all, one can spend a year without committing mortal sins. So, what does one have to confess but for one's 'lesser sins ' and ideations ?