Tragically, I have an incurable disease and have little time left. I have told a number of friends about this and said good-bye to them in an email. In return, I have received a number of emails that were laudatory. My question is am I permitted to collate them in some format and ask someone to read them during my funeral?
I wonder whether you might find the concept of an Ethical Will helpful. The linked article says:
This might be a way of encouraging your descendants to continue those ways that others have seen fit to praise.
We already see from Tanach that there's a serious [collective] punishment for not eulogizing somebody properly. In King David's time they were punished for not eulogizing King Shaul and his sons.
The Halachot of Hesped are codified at the end of Yoreh Deah - and include the following: - One may not exaggerate at a hesped; though some allow a little embellishment. - There's possibly a punishment (for the deceased and/or the Maspid) if a Hesped includes imaginary praises.
Writing one's own Hesped would solve the above trapfalls!
BTW: Many Seforim have an autobiography of sorts - and most of them (of recent vintage) include laudatory letters of approbation; collecting and publishing these seem to be allowed, nay encouraged.
With wishes for a Refu'a Shelemah; only Hashem decides who will pass away and when.