Options for tile under the sliding door casing
Don't do it with MDF. MDF is way too soft material, and once water gets to it, it will be ruined very quickly.  This is a place that sees lots of dirt and foot traffic. You need a hard and strong material, and durable and washable finish here.


Buy two pieces of hardwood (maple, oak, etc.).
Cut them to size: top piece should have a slight overhang, and front piece should be 1/8" (3mm) less than the height needed. 
"Ease" the front edge of the top piece (make it more round): a hand plane would do, or just a piece of sandpaper.
Nail them to 2x4, the front piece should have a small gap at the bottom (it will be covered by tiles, but will allow the wood to move seasonally).
Fill the nail holes, sand and finish them to match your door frame: oil-based glossy paint will be most durable solution.