I am sorry to hear of your loss, I have seen the passing of way too many friends. Hopefully it will be a celebration of his life.
Attend if at all possible as closure for you and solace for his family.
I have experienced that scenario when the melody comes into my head, then I am coming up with lyrics as fast as I can write them down. I wish I could will it to happen, but it's spontaneous and out of my control.
Such a tragedy! I read years ago that Elvis felt like whether he had friends or not hinged upon whether he had a hit record on the charts or not. It was also written that the man they called "The King" was so lonely that he was known to pay people just to hang around and talk with him.