It's still not clear whether the perp was a suicide bomber or accidentally set off the bomb while he was trying to prime it. Either way, he's dead from the bomb blast, although he wasn't killed instantly; the bomb might have been in a rucksack he was carrying rather than strapped to his back. (See my earlier post featuring different news reports on the incident.)
It's also not clear whether the bomber, a Syrian, was a migrant or refugee. Different BBC headlines have characterized him both ways.
What is clear from the following report is that the German government put him up in an apartment even after rejecting his request for asylum and let him stay in the country.
As for his mental problems -- not so crazy that he couldn't build or obtain a bomb constructed to do a lot of harm to many people at a music concert; it's just that for whatever reason it wasn't as lethal as intended.
From BBC report, July 25:
The explosion is reported to have happened at about 22:10 (20:10 GMT) outside the Eugens Weinstube bar in the city centre which is a short distance from the entrance to the Ansbach Open music festival.