Man shoots self while fleeing from officers, police say