When I die, how much of the experience I have gained is made into orbs?
It appears the amount of experience lost upon dying is approximately the same as the amount of orbs that gets dropped.
Upon the player's death, a number of Experience Orbs are dropped at the location of death. … The number of orbs that are reclaimed is about the same number as the amount lost. - MC Wiki
Upon testing it myself, it seems the experience dropped isn't equal to the experience you had before you died. After running three tests, I usually got about 1/2 of the experience I had before I died.
This image contains three tests: the experience meter before is on top and the experience bar after is below. Also, in the third test, I had an entire bar of experience plus what is shown.
The Minecraft Wiki is quite detailed about experience points and experience levels. This may not have been the case at the time the previous answer and comments were written.
https://minecraft.gamepedia.com/Experience
"When the player dies, they drop experience orbs worth 7 * current level experience points, up to a maximum of 100 points (enough to reach level 7). All the other experience vanishes."