There are three important factors about successful mining: weapon, healing, and boots. The better your weapon, the faster you will kill the mobs that attack you. The better the food you eat to heal, the easier it is to restore your energy and health. And the better your boots, the better your defense against mob attacks.
As you reach deeper levels in the mines, you will be able to purchase better weapons at the Adventurer's guild. You will also receive weapons in chests as rewards for reaching deeper levels, although being able to purchase them makes it a bit easier getting to the deeper levels. The lava katana is the best weapon you can purchase from the Adventurer's guild which becomes available once you reach level 120 in the mines. Buy it when you can.
Once you are able to get your first prismatic shard, go to the Desert and convert it to a galaxy sword. It is considerably better than the lava katana.
For food, grow melons during the summer for healing. I save the golden ones to use for healing, though the others will work almost as well.
My most important goal in a game is to obtain the galaxy sword as soon as I can. Luck plays an important role in this. Once you complete the Bridge repair you will have access to a bunch of mineable nodes. Here is where luck plays a significant role. I have played games where a mystic stone or Iridium node appear once the bridge is repaired. Once one of these appears you can get your prismatic shard. What you receive when you break open one of these two nodes varies from day to day. So when one of these appears, travel there first thing in the morning and break it open. If you get a prismatic shard, shout for joy, go to the desert and get your galaxy sword. If you do not get a prismatic shard, restart your day and wait until the next day to try again for the prismatic shard. Rinse and repeat until you finally get your prismatic. I state all this because obtaining the galaxy sword will make all mob killing a lot easier.
Stardew Valley is a complex game, amazingly well developed by CA (Concerned Ape). It takes a while playing the game to learn how to succeed. Keep at it, and you will!