Bhagavad Gita Chapter 18.37
yat tad agre viṣam iva
pariṇāme ’mṛtopamam
tat sukhaḿ sāttvikaḿ proktam
ātma-buddhi-prasāda-jam
Translation
That which in the beginning may be just like poison but at the end is just like nectar and which awakens one to self-realization is said to be happiness in the mode of goodness.