Mix hydrogen peroxide with xantan gum powder at 2% in order to obtain a gel and use that in the trays you probably already have, if you don't buy some from China on eBay for as little as few dollars.
Hydrogen peroxide comes in different strengths, the 3% from the drugstore is not strong enough, I use 20% but that is sort of the top max strength for this use.
I suggest to buy something around 20% or even stronger and dilute in water to something like 10% strength, than work your way up according with your needs.
The gel you buy is carbamide peroxide which is a form of hydrogen peroxide with urea, when in the mouth it starts to separate and becomes available hydrogen peroxide, it takes a while to happen, about 10-15 minutes or so, it will do nothing in whitening during that time therefore if you keep it for let say 20 minutes it actually does the whitening for only 5 minutes.
When you use hydrogen peroxide it starts working immediately, you can adjust the strength as you like and will cost you close to nothing.
The stronger the faster it works, of course, but the more discomfort you may experience.
Avoid to get the gel in contact with the gums since it may hurt, it doesn't really damage them but is unnecessarily unpleasant.
In order to avoid sensitivity start with low strength and relatively short time (maybe 10 minutes or so) and work gradually your way up in order to find your sweet spot.
Some sensitivity is normal, gently brushing with baking soda will fix that, if too much sensitivity is reached stop for a day or two before resuming the treatment.
It is not painful, it can get painful if the gel comes in contact with the gums, especially if the gel is strong and/or the gums unhealthy.
There is not another way to achieve the same results AFAIK, in the dentist office a strong lamp and a strong hydrogen peroxide will be used in order to obtain a satisfactory result in one application only but is crazy expensive and the results are less long lasting, side effects will be the same if not worst.
Remineralization does occur naturally by saliva, usually nothing else is necessary, diluted magnesium oil mouth washing may help.
Avoid staining foods or beverages (or smoking) while you do the whitening and for a week or two afterward in order to allow remineralization to take place first (the enamel tends to get porous from the loss of minerals caused by the hydrogen peroxide, that's why you experience sensitivity).
Research shows no damage or side effects from the procedure.