That's nasty!
I'm a judo player and I bu&&ered up my knee. As soon as I went to the doc it was confirmed I needed surgery and after surgery I would be off the mat for 9 months.
Instead of getting annoyed about it etc (nothing I could do about it) I looked at that day as the first day of my recovery. Each day leading up to and after the surgery was a day closer to getting back to the mat.
So your challenge is to set today as day one. From now on, every day is a day closer to you playing the piano again. Sure, I cannot guarantee that your finger will not move a little slower than before (but doctors are often wrong), but you will get back to it and you will enjoy it again.
So good luck with your challenge!!
(I got back on the mat and although I no longer compete, age more than the injury, I still love a good rumble on the mat. Yes, my knee is a little grumpy at times, but it doesn't stop me enjoying what I do)