No, the enlightened beings don't commit suicide. Rama besides being a God, was an Enlightened being, and for the enlightened person leaving one's mortal coil is termed a Samadhi.
For instance, here's an excerpt from the Skanda Mahā-Purāṇa, which describes his death (jala-Samadhi in the Sarayu river) of Lakshmana and subsequent âkâsha-vani on his Enlightened status to desist Rama from performing his funeral rites.
Chapter 100, Tīrtha-māhātmya, Nāgara-khaṇḍa, Skanda-purāṇa
- 13 & 14. “O Lakṣmaṇa, you have been abandoned by me, go to another land immediately. In the case of good persons banishment and killing
both are equal. I should not see you again on any account. If you wish
to do what pleases me, you shall not stay in this land any more.”
.....
Then he went to River Sarayū and entered the waters thereof. After purifying himself, he sat on the banks in a secluded but very splendid
spot.
He adopted the posture of Padmāsana; concentrated the soul within the supreme Ātman. Thereafter he discharged (himself in) the form of
Tejas (splendour) through the Brahmadvāra (cerebral aperture).
Rāghava saw that great Tejas going up into the sky. He was surprised and thought: ‘What could be this?’.
O excellent Brāhmaṇas, that fourth part of Viṣṇu, the Tejas, abandoned the mortal sphere.
At the very instant, Lakṣmaṇa’s physical body fell down on the ground on the splendid banks of Sarayū, devoid of all glory, like a
piece of wood or a lump of clay.
On hearing that Lakṣmaṇa had ceased to live and his body had fallen on the river bank, Rāghava lamented miserably.
Along with his ministers and friends, he himself went to that place. Seeing Lakṣmaṇa fallen he lamented piteously:
....
O great king, do not be grief-stricken like an unenlightened one. Make arrangements so that the obsequial rites may be performed.
Those who bewail what is lost, dead or past are foolish and silly. Bold and intelligent men treat what is lost as lost and what is dead
as dead.
......
In the meantime, O excellent Brāhmaṇas, something miraculous and mysterious took place. Do listen to it even as I narrate.
While they placed the body (of Lakshmana) on the pyre and were about to kindle the fire, the body vanished.
In the meantime a voice rose up in the firmament after a shower of flowers. All the quarters reverberated with the sound:
- 41 & 43. “O Rāma, O Rāma, O mighty-armed one, do not be distressed. It is not at all proper to apply fire to him (Lakṣmaṇa).
- "Cremation by the application of fire is not proper in regard to one endowed with the knowledge of Brahman, particularly in the case of one
who has renounced the world. Burning the bodies of all Yogins is
improper."
O Rāma, your brother has gone to the abode of Brahman. The highly renowned one has released his soul through the cerebral aperture.”
English Translation by G.V. Tagare
In any case,
Similar is the case for Sri Rama.
The term, which the Uttara-kanda of the Ramayana use for ascension of Rama, as Vishnu, to his own abode is Mahaprasthana
Chapter 109, Book 7 - Uttara-kanda
Thereupon Vasishtha, full of majesty, performed the prescribed rituals
related to the Mahaprasthana without omitting anything. Then Rama,
clothed in fine silk, invoking Brahma and reciting the Vedic Mantras,
taking Kusha Grass in both his hands, set out for the Sarayu River,
halting from time to time, silently making his way along the rough
path, Radiant as the sun, he issued from his palace barefooted and, on
his right, walked Shri Lakshmi with her lotus, on his left, was the
great Goddess Vyavasaya [i.e., The Goddess of the Earth] and, assuming
human form, his innumerable arrows, marvellous bow and all the other
weapons accompanied him. The Vedas, in the persons of brahmins, the
Holy Gayatri, Protector of the World, the sacred syllable “aum” and
the invocation “Vashat” followed in Rama’s train as also the
great-souled Rishis, and all the Deities of the Earth accompanied that
hero to the open gates of heaven.
It is very logical to assume that a suicidal person won't accompanied by the hosts of divine celestials, and gods and goddesses, if they were to perform a "suicide".
It wasn't a suicide, at best it can be speculated as a Jala-Samadhi, for we see in the next Chapter that Rama too his original form as Vishnu himself being eulogised by god Brahmâ.
Chapter 110, Book 7 - Uttara-kanda
At that moment, as Kakutstha was preparing to ascend to heaven,
Brahma, the Grandsire of the World, surrounded by the Gods and the
illustrious Rishis adorned with jewels, appeared seated in their
aerial chariots, and the whole firmament glowed with a transcendent
splendour, a marvellous radiance emanating from the lustre of those
heavenly beings of virtuous deeds. Pure, balmy and fragrant breezes
blew, whilst shower upon shower of blossom was scattered by the Gods.
Thereafter to the sound of a myriad instruments and the singing of the
Gandharvas and Apsaras, Rama stepped into the waters, where-upon the
Grandsire, from on high, uttered these words:—
“Hail O Vishnu! Hail O Raghava! With your God-like brothers, now enter
thine eternal abode, Return to thine own body if you so desirest, O
Long-armed Warrior! Occupy the realm of Vishnu or the shining ether, O
Mighty God! You are the support of the world, though there are some
who do not recognize You without the large-eyed Maya, thine ancient
Consort! You are the Inconceivable One, the Great Being, the
Indestructible, the Ageless One. Enter into your real body if You so
desirest.”
Hearing these words of the Grandsire, the supremely virtuous Rama
formed his resolution and entered Vishnu’s abode in his body with his
younger brothers.
Thereupon Immortals began to worship that God who had returned to His
form as Vishnu, and the Sadhyas, the hosts of Maruts with Indra and
Agni at their head, the celestial companies of Rishis, the Gandharvas
and Apsaras, Supamas, Nagas, Yakshas, Daityas, Danavas and Rakshasas
and all the dwellers in heaven felt a supreme delight, their desires
fulfilled, their sins washed away, and they cried out “Hail! All
Hail!”
English Translation by Hari Prasad Shastri
To conclude,
Sri Rama didn't commit suicide, he maybe said to have taken the 'jala-samadhi' as a part of his Mahaprasthana leela, where on entering the Sarayu river he appeared in his original form of God Vishnu himself. Just, as we see from the excerpt of Skandamahāpurāṇam, that Lakshman's body vanished as he fell dead, so we may infer logically for Rama too.
There was no need of last rites, as is in the case of Enlightened people, however, as part of dharma, we may assume his sons -(Lava-Kusha) ought to perform those, if required.