No, as seen here in the wikiwiki,
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.