Unless he is severely weakened and has been ill for a very long time (I doubt that) then his chances for recovery are good. Your vet should be able to clear this up, don't worry yourself. You can do your part by making sure the conditions in his enclosure are good. Proper range of temperature, (pay attention to air temps, don't just use a heat pad and think that's enough) clean substrate, a proper gradient, etc. Something contributed to him becoming ill. Could be stress from improper gradient/environment but could also be parasites or some other infection he caught before you got him that led to stomatitis if that is indeed what he has.