But there are times when your bulge should not be seen-like a funeral.
If it's a funeral, you'll probably be wearing black, so any bulge should be less obvious. Don't try to restrain your package too much, as that can sometimes stimulate & be counterproductive, but choose underwear that allows things to lie relatively flat.
For formal trousers, get something with single pleats in the front to give a little more room to manoeuvre (double pleats make the crotch too billowy when you sit or bend), particularly if they're grey, paler colours & stripes, which make any contours more obvious. I usually do this, but recently bought a couple of tailored suits with flat fronted trousers, one of which is grey, without realising that this might not be the best idea. They looked great in the shop. However, underwear that concentrates my package creates a centred bulge that really isn't appropriate for work (see my underwear gallery), so in these trousers I try to keep my dick horizontal with relatively snug underwear and if necessary keep my wallet in my left hip pocket to disguise what's there. The only real issue I've had with these trousers was seeing my ex off on a train journey. After saying goodbye, there was absolutely no hiding things, which I think slightly alarmed a little old lady whose dog decided to get friendly, and who therefore ended up looking directly at the offending bulge.
In situations like that, the worst thing is to act embarrassed, as that also embarrasses other people. Best to just politely say good morning...