Actually this is one of the most interesting questions rising about the artificial intelligence. To answer this, in a technical and meaningful manner is to first set common ground on what emotions are.
What actually are human emotions?
Emotions are feelings that people have and talk about in response to different things, like events, thoughts, or situations. Psychology says that emotions are complex, personal experiences that involve different physical and mental reactions.
Some of these reactions are changes in the heart rate, muscle tension, sweating, and the way the face looks. Emotions have a big impact on how people act and what decisions they make. People often group them into basic emotions like happiness, anger, fear, sadness, and disgust, and they can be strong or mild and last for different amounts of time.
In my opinion, how we experience emotions is the result of the personal life experience since childhood, surrounding environment, etc. In simple I would say that emotions are caused by the clash between our expectancy with the reality. When what is really happening matches our subconsciously calculated expectations we feel positive emotions and vice-versa.
If we agree on this as a common ground then we probably can answer the following question.
Can machines feel emotions?
Despite how “smart” they can be, by using tons of data inputted by humans and ability to calculate fast best scenarios based on probability and statistics, I would say that what machines are missing is the self-awareness.
Artificial Intelligence can not be able (not yet) to think on its own without some preprogrammed input. It can not ask basic human life questions like “why do i exist?”, “what is the purpose of life?”. Missing these key ingredients I would say that they can not feel emotions.
Nowadays we can speak with human-like machines like ChatGPT and because the conversation might feel human, we are just projecting our own feelings over the machine. It is like watching a beautiful picture generated by the AI, the nature on the picture will give us emotions, but the generator had no emotions while making it.
Based on the logic above, as a conclusion, my answer would be no, AI can not feel any human-like emotion.
We, as humans, because of our empathy are just projecting our own emotions into the machines and sometimes trying to catch the black cat in a dark room that does not even exist.