My theory on Dr. WD Gaster is a slight deviation on MatPat's.

First: Who is Gaster?
This one's rather easy. As said directly from the Gaster Followers, Gaster was the Royal Scientist to precede Alphys. He invented the CORE that powers the monster's society and the DT Extractor, probably among other things.

Second: How did Gaster die?
This one's not as easy. So, first off, GF1's dialogue very heavily implies that Gaster fell into the CORE. We could just say he died there, but that doesn't quite fit Research Log 17 written by Gaster himself in his signature font. In it, he describes everything getting darker and the feeling of being cut apart. If he fell in the CORE's active areas, he would see more and more light, not darkness. If he fell in the inactive areas, he wouldn't feel like he was cut apart. It just doesn't fit. So that's not the end.

Consider Alphys's Research Logs. In them, she describes that the DT test subjects were monsters that had "fallen down". Fallen down how and where though? They can't be dead as DT would then be useless, so any falls that would kill are impossible. The Ruins? No one has access. Snowdin? The cliff with the bridge is said to be fake and other cliffs wouldn't have access to any rescue. Waterfall? Those cliffs lead to an abyss, as said by the garbage save. Hotland? There's lava down there. So where would monsters fall? It's simple: Where did Gaster fall? That's right, the CORE. This means that falling into the CORE isn't lethal. So, what does this mean for Gaster? He was one of the DT subjects. But the amalgamate-like "Mystery Man" sprite doesn't have anyone fused with him, so Gaster is an incomplete amalgamate, not fused with another monster but OD'd on DT either way.

Because of how highly Gaster is praised, we can infer that he would be the type of scientist to test his potentially dangerous experiments on himself. So, which invention was recently built by Alphys and designed by Gaster to treat DT experiments? The DT Extractor. This is what Research Log 17 was written about. This is where Gaster died.

Lastly: What happened to Gaster afterwards?
This is where we must infer a bit. I agree with MatPat's take on this part (see his most recent video, Gaster Part 2) but with a bit extra with my differing cause of death. When the DT Extractor was used on Gaster, he was split into two bodies: One with a great amount of physical mass but little determination to make it live and one with a great amount of determination but a little physical mass as a host. Enter Sans and Papyrus.

Sans is the body of Gaster with only a small portion of his soul and determination. You can see this in his appearance, being a more realistic skeleton who's always smiling. This DT deficiency causes Sans to be as he is, lazy. Research Logs 18 and up prove this with their lack of care for ELA, which differs from what's expected of a scientist. They also prove that Sans being the body gave him Gaster's memory, explaining his knowledge of things, his lab and room, his knowing Alphys, and the research he mentions in his fight with you at the end of a Genocide run. That fight shows this, too. Having a small soul, Sans can easily dodge attacks but has very little health. His lacking soul power also makes him only able to do 1 damage per hit, but Sans uses this to his advantage with his intellect allowing him to reduce your invincibility frames. His dense physical form could also explain the blood at the end of the fight, but that's a bit of a stretch. Maybe it is just ketchup?

Papyrus is the excess determination incarnate with just a little bit of physical mass carried from Gaster. This can be seen in his appearance, too, being a more cartoonish skeleton and being able to do bizarre things like having eyeballs at will and being able to make them cry. His personality is another indicator, just like Sans. He is determined to do whatever he sets his mind to. He has lofty goals, but none related to what Gaster wanted. This DT excess can also be seen in his battle. Having high soul power, he can't dodge but can tank hits with the best of them. He even crafts complex attacks like the bone on a skateboard. Undyne comments on his raw power by saying he's "pretty fricking tough" but has one fatal flaw. He's too nice. Having none of Gaster's memories, Papyrus is LV 1. He has no desire to kill anyone, not even a human. Considering what humans have done, any monster alive at that point would at least have some sort of reason to kill a human, but Papyrus doesn't. He wasn't alive when that happened. As Snowdin's residents say, he and Sans just showed up one day. Back to Papyrus, this lack of a will to kill prevents him from distancing himself from others, making him appear weak and physically incapable of killing you.

And a little hypothesis for the end here:
This is why Papyrus is so nice. Because Sans has Gaster's memory and knows that Papyrus would be an extraordinarily powerful monster, having so much determination, he raised Papyrus to be nice. By keeping Papyrus's LV low, Sans was able to make sure Papyrus wouldn't become too powerful, despite logically being many times more powerful than Sans himself.

Post has attachment
5 Photos - View album

Post has attachment
Animated Photo

Post has attachment
Gaster, The character in UnderTale made to be a mystery. Did you know: Gaster's voice chip is Sans & Papyrus voice chip together? Weird right? 

Post has attachment

Post has attachment

Post has attachment
This person thinks they've sovled the mystery of Gaster, But I think there's more to it.

Yeah Gaster whoooo!

Post has attachment
To Find out Gaster, We First Need To Find Out About Sans
Wait while more posts are being loaded