To do so well can be a source of some pride, friend (7)
I believe the answer is:
ideally
'to do so well can be a source' is the definition.
I can't judge whether this defines the answer.
'some pride friend' is the wordplay.
'some pride' becomes 'ide' (I can't justify this - if you can you should believe this answer much more).
'friend' becomes 'ally' (an ally is a friend or supporter).
'ide'+'ally'='IDEALLY'
'of' acts as a link.
Can you help me to learn more?
(Other definitions for ideally that I've seen before include "in theory" , "for preference" , "Perfectly; most suitably" , "In the best possible way or circumstances" , "In perfect circumstances" .)