Ravan was fully confident that Shri Ram will not be able to even find Lanka let alone defeat him then one day a Vaanar comes and kills his youngest son. Throughout the war he had to see his kingdom gets destroyed and sons die. 

In Sarga 59 of Yuddha kand, he is defeated and humiliated by Shri Ram and spared. 

> **तं निर्विषाशीविषसंनिकाशं | शान्तार्चिषं सूर्यमिवाप्रकाशम् |<br>
गतश्रियं कृत्तकिरीटकूट | मुवाच रामो युधि राक्षसेन्द्रम् ||** ६-५९-१४१

> In that battle-field, Rama said to that Lord of Demons whose splendour was dimmed, the setting of his diadem river, who resembled a venomous snake robbed of its poison or like a sun its rays extinguished, bereft of lustre.

> कृतं त्वया कर्म महत्सुभीमं | हतप्रवीरश्च कृतस्त्वयाहम् |<br>
तस्मात्परिश्रान्त इति व्यवस्य | न्न त्वां शरैर्मऋत्युवशम् नयामि || ६-५९-१४२

> You have accomplished a highly terrific great feat and my brave soldiers have succumbed beneath your blows. Now, you are weary and in this condition, I shall not put you under the clutches of Death.

> स एवमुक्तो हतदर्पहर्षो | निकृत्तचापः स हताश्वसूतः |<br>
शरार्दितो भग्नमहाकिरीटो | विवेश लङ्काम् सहसा स्म राजा ||

> At these words, that King Ravana, his joy boasting subdued, his bow shattered, his horses and chariot slain pierced with arrows, his great diadem broken, he soon returned to Lanka.



This is before Indrajeet and Kumbakaran even came on battlefield. If Rama had killed him swiftly then he would have spared lot of emotional pain of death of his sons and brother. At the end, he is left all alone before final Ram-Ravan yuddh.


Source: https://www.valmikiramayan.net/utf8/yuddha/sarga59/yuddha_59_frame.htm