Certain characters can damage themselves during the pre-game countdown, notably Junkrat and Pharah. If Mercy heals that damage before the game starts, she doesn't gain ultimate charge (so I've heard). However, does that hold true if she waits for the game to start before healing? Can you just have a Pharah and a Mercy in a corner taking an explosion bath and building ult?
No, as seen here in the wiki,
Mercy will build ultimate charge from both healing and damage boosting, but not if the damage is self-inflicted in either case.
Therefore, healing or damage boosting with the Caduceus Staff (which only works on others) does not generate ultimate charge if the damage is self-inflicted (i.e. Mercy would not get ultimate charge by buffing or healing a Junkrat that is standing on bombs as they explode).
Also, as to your comment about ultimate charging in pre-game, this is because ultimate meters don't start charging till the game starts. I've also tested both of these myself.