I know that lactose is used in the brewing process for milk stout, but I don't know if it remains there by the end of the brewing process. I'm very lactose intolerant, and want to know if I need to take a lactase pill if I drink a milk stout.
Yes, the lactose remains in the beer at the end of brewing.
In normal beer, the only sugar which enters the brewing process is from the malted barley: maltose and glucose released by the breakdown of starch, and a little sucrose and fructose. This 1953 analysis by a chemist in the Carlsberg research laboratory has all the gory details.
Normal brewing yeast has enzymes that break down glucose and fructose, but not lactose. This kind of yeast evolved on rotting fruit, where there is plenty of sucrose, glucose, and fructose, but no lactose, so they never needed the enzymes. There are other yeasts which can ferment lactose, but they aren't used in brewing, except by zany vodka makers and Mongols.
So, in a normal beer, potentially all of the sugar can be broken down during brewing. Whether it is or not is up to the brewer, who can stop the process while sugar remains, or let it run to completion. However, in a milk stout, there is no way for the lactose to be broken down, so it all remains at the end.
The amount of lactose in a milk stout varies, but it seems that it is likely to be in the range of 5 to 13%; that is, in a (568 millilitre) pint, there may be anywhere from 28 to 74 grams of lactose. The lactose concentration in milk is about 4%, so this is the equivalent of 700 - 1850 millilitres of milk. Rather a lot!
Perhaps you might like a honey porter instead?